diff --git a/public/import-sources.json b/public/import-sources.json index bcd4323..505eaa0 100644 --- a/public/import-sources.json +++ b/public/import-sources.json @@ -1,12 +1,4 @@ [ - { - "id": "linkedin", - "name": "LinkedIn", - "type": "linkedin", - "icon": "LinkedInIcon", - "description": "Import your LinkedIn connections", - "isAvailable": true - }, { "id": "contacts", "name": "Contacts", @@ -14,5 +6,21 @@ "icon": "ContactsIcon", "description": "Import from your device contacts", "isAvailable": true + }, + { + "id": "gmail", + "name": "Gmail", + "type": "gmail", + "icon": "GmailIcon", + "description": "Import your Gmail contacts", + "isAvailable": true + }, + { + "id": "linkedin", + "name": "LinkedIn", + "type": "linkedin", + "icon": "LinkedInIcon", + "description": "Import your LinkedIn connections", + "isAvailable": true } ] \ No newline at end of file diff --git a/src/components/account/MyCollectionPage.tsx b/src/components/account/MyCollectionPage.tsx index 0db9647..e811815 100644 --- a/src/components/account/MyCollectionPage.tsx +++ b/src/components/account/MyCollectionPage.tsx @@ -41,11 +41,7 @@ import { PostAdd, Visibility, FolderOpen, - QueryStats, - Psychology, Send, - AutoFixHigh, - StarOutline, AutoAwesome, } from '@mui/icons-material'; import type { BookmarkedItem, Collection, CollectionFilter, CollectionStats } from '../../types/collection'; @@ -67,7 +63,7 @@ const MyCollectionPage = ({}: MyCollectionPageProps) => { const [menuAnchor, setMenuAnchor] = useState<{ [key: string]: HTMLElement | null }>({}); const [showQueryDialog, setShowQueryDialog] = useState(false); const [queryText, setQueryText] = useState(''); - const [stats, setStats] = useState({ + const [/* stats */] = useState({ totalItems: 0, unreadItems: 0, favoriteItems: 0, @@ -231,25 +227,25 @@ const MyCollectionPage = ({}: MyCollectionPageProps) => { setFilteredItems(mockItems); // Calculate stats - const categories = [...new Set(mockItems.map(item => item.category).filter(Boolean))]; - const types = [...new Set(mockItems.map(item => item.type))]; - const recentDate = new Date(Date.now() - 1000 * 60 * 60 * 24 * 7); - - const newStats: CollectionStats = { - totalItems: mockItems.length, - unreadItems: mockItems.filter(item => !item.isRead).length, - favoriteItems: mockItems.filter(item => item.isFavorite).length, - byType: types.reduce((acc, type) => ({ - ...acc, - [type]: mockItems.filter(item => item.type === type).length - }), {}), - byCategory: categories.reduce((acc, category) => ({ - ...acc, - [category || 'Uncategorized']: mockItems.filter(item => item.category === category).length - }), {}), - recentlyAdded: mockItems.filter(item => item.bookmarkedAt > recentDate).length, - }; - setStats(newStats); + // const categories = [...new Set(mockItems.map(item => item.category).filter(Boolean))]; + // const types = [...new Set(mockItems.map(item => item.type))]; + // const recentDate = new Date(Date.now() - 1000 * 60 * 60 * 24 * 7); + + // const newStats: CollectionStats = { + // totalItems: mockItems.length, + // unreadItems: mockItems.filter(item => !item.isRead).length, + // favoriteItems: mockItems.filter(item => item.isFavorite).length, + // byType: types.reduce((acc, type) => ({ + // ...acc, + // [type]: mockItems.filter(item => item.type === type).length + // }), {}), + // byCategory: categories.reduce((acc, category) => ({ + // ...acc, + // [category || 'Uncategorized']: mockItems.filter(item => item.category === category).length + // }), {}), + // recentlyAdded: mockItems.filter(item => item.bookmarkedAt > recentDate).length, + // }; + // setStats(newStats); }, []); // Filter and sort items diff --git a/src/components/account/MyHomePage.tsx b/src/components/account/MyHomePage.tsx index 1d5a41d..6a7f978 100644 --- a/src/components/account/MyHomePage.tsx +++ b/src/components/account/MyHomePage.tsx @@ -11,7 +11,6 @@ import { MenuItem, TextField, InputAdornment, - Grid, Button, Divider, } from '@mui/material'; @@ -24,7 +23,6 @@ import { Edit, Delete, Share, - ThumbUp, Comment, Download, Launch, diff --git a/src/components/account/PersonhoodCredentials.tsx b/src/components/account/PersonhoodCredentials.tsx index 371ec01..f00ab62 100644 --- a/src/components/account/PersonhoodCredentials.tsx +++ b/src/components/account/PersonhoodCredentials.tsx @@ -8,7 +8,6 @@ import { Chip, Button, Grid, - LinearProgress, IconButton, Dialog, DialogTitle, @@ -30,17 +29,14 @@ import { Share, Timeline, LocationOn, - CalendarToday, - TrendingUp, Security, - People, Star, Refresh, Info, Close, } from '@mui/icons-material'; import { QRCodeSVG } from 'qrcode.react'; -import type { PersonhoodCredentials, PersonhoodVerification } from '../../types/personhood'; +import type { PersonhoodCredentials } from '../../types/personhood'; interface PersonhoodCredentialsProps { credentials: PersonhoodCredentials; @@ -48,7 +44,7 @@ interface PersonhoodCredentialsProps { onRefreshCredentials: () => void; } -const PersonhoodCredentials = ({ +const PersonhoodCredentialsComponent = ({ credentials, onGenerateQR, onRefreshCredentials @@ -57,13 +53,13 @@ const PersonhoodCredentials = ({ const [showQRDialog, setShowQRDialog] = useState(false); const [showHistoryDialog, setShowHistoryDialog] = useState(false); - const getCredibilityLevel = (score: number) => { - if (score >= 90) return { label: 'Excellent', color: 'success' as const }; - if (score >= 75) return { label: 'High', color: 'info' as const }; - if (score >= 60) return { label: 'Good', color: 'warning' as const }; - if (score >= 40) return { label: 'Fair', color: 'warning' as const }; - return { label: 'Low', color: 'error' as const }; - }; + // const getCredibilityLevel = (score: number) => { + // if (score >= 90) return { label: 'Excellent', color: 'success' as const }; + // if (score >= 75) return { label: 'High', color: 'info' as const }; + // if (score >= 60) return { label: 'Good', color: 'warning' as const }; + // if (score >= 40) return { label: 'Fair', color: 'warning' as const }; + // return { label: 'Low', color: 'error' as const }; + // }; const formatDate = (date: Date) => { return new Intl.DateTimeFormat('en-US', { @@ -85,7 +81,6 @@ const PersonhoodCredentials = ({ return `${Math.floor(diffInDays / 365)} years ago`; }; - const credibilityLevel = getCredibilityLevel(credentials.credibilityScore); return ( @@ -342,4 +337,4 @@ const PersonhoodCredentials = ({ ); }; -export default PersonhoodCredentials; \ No newline at end of file +export default PersonhoodCredentialsComponent; \ No newline at end of file diff --git a/src/components/account/RCardPrivacySettings.tsx b/src/components/account/RCardPrivacySettings.tsx index 04b1cff..cad140a 100644 --- a/src/components/account/RCardPrivacySettings.tsx +++ b/src/components/account/RCardPrivacySettings.tsx @@ -12,7 +12,6 @@ import { InputLabel, Slider, Divider, - Chip, alpha, } from '@mui/material'; import { diff --git a/src/pages/AccountPage.tsx b/src/pages/AccountPage.tsx index a841397..273a09f 100644 --- a/src/pages/AccountPage.tsx +++ b/src/pages/AccountPage.tsx @@ -12,7 +12,6 @@ import { Avatar, Button, IconButton, - Chip, useTheme, alpha, } from '@mui/material'; @@ -37,8 +36,8 @@ import RCardPrivacySettings from '../components/account/RCardPrivacySettings'; import RCardManagement from '../components/account/RCardManagement'; import MyHomePage from '../components/account/MyHomePage'; import MyCollectionPage from '../components/account/MyCollectionPage'; -import PersonhoodCredentials from '../components/account/PersonhoodCredentials'; -import type { PersonhoodCredentials as PersonhoodCredentialsType } from '../types/personhood'; +import PersonhoodCredentialsComponent from '../components/account/PersonhoodCredentials'; +import type { PersonhoodCredentials } from '../types/personhood'; interface TabPanelProps { children?: React.ReactNode; @@ -61,7 +60,7 @@ const AccountPage = () => { const [selectedRCard, setSelectedRCard] = useState(null); const [showRCardManagement, setShowRCardManagement] = useState(false); const [editingRCard, setEditingRCard] = useState(null); - const [personhoodCredentials, setPersonhoodCredentials] = useState({ + const [personhoodCredentials] = useState({ userId: 'user-123', totalVerifications: 12, uniqueVerifiers: 8, @@ -344,7 +343,7 @@ const AccountPage = () => { {/* Personhood Credentials Section */} - { - -