import { useState } from 'react'; import { Title, Text, Card, Stack, Group, SimpleGrid, Badge, ThemeIcon, Divider, Tabs, Button, Switch, } from '@mantine/core'; import { IconBuilding, IconUser, IconSettings, IconShieldLock, IconFingerprint, IconLink, IconLogout, } from '@tabler/icons-react'; import { notifications } from '@mantine/notifications'; import { useAuthStore } from '../../stores/authStore'; import { usePreferencesStore } from '../../stores/preferencesStore'; import { MfaSettings } from './MfaSettings'; import { PasskeySettings } from './PasskeySettings'; import { LinkedAccounts } from './LinkedAccounts'; import api from '../../services/api'; export function SettingsPage() { const { user, currentOrg } = useAuthStore(); const { compactView, toggleCompactView } = usePreferencesStore(); const [loggingOutAll, setLoggingOutAll] = useState(false); const handleLogoutEverywhere = async () => { setLoggingOutAll(true); try { await api.post('/auth/logout-everywhere'); notifications.show({ message: 'All other sessions have been logged out', color: 'green' }); } catch { notifications.show({ message: 'Failed to log out other sessions', color: 'red' }); } finally { setLoggingOutAll(false); } }; return (
Settings Organization and account settings
{/* Organization Info */}
Organization Current organization details
Name {currentOrg?.name || 'N/A'} Your Role {currentOrg?.role || 'N/A'}
{/* User Profile */}
Your Profile Account information
Name {user?.firstName} {user?.lastName} Email {user?.email} User ID {user?.id?.slice(0, 8)}...
{/* System Info */}
System Platform information
Platform HOA LedgerIQ Version 2026.03.17 API /api/docs
Compact View Reduce spacing in tables and lists
{/* Sessions */}
Sessions Manage active sessions
Current Session Active
{/* Security Settings */}
Security Manage authentication methods and security settings
}> Two-Factor Auth }> Passkeys }> Linked Accounts
); }