import { observer } from 'mobx-react-lite'; import { AppState } from '@/ui_models/app_state'; import { PasswordWizardType } from '@/types'; import { WebApplication } from '@/ui_models/application'; type Props = { email: string; server: string | undefined; appState: AppState; application: WebApplication; closeAccountMenu: () => void; } const User = observer(({ email, server, appState, application, closeAccountMenu }: Props) => { const openPasswordWizard = () => { closeAccountMenu(); application.presentPasswordWizard(PasswordWizardType.ChangePassword); }; const openSessionsModal = () => { closeAccountMenu(); appState.openSessionsModal(); }; return (
{appState.sync.errorMessage && (
Sync Unreachable
Hmm...we can't seem to sync your account. The reason: {appState.sync.errorMessage}
Need help?
)}
{email}
{server}
Change Password Manage Sessions
); }); export default User;