diff --git a/webapp/src/components/SettingsPage.tsx b/webapp/src/components/SettingsPage.tsx index 0a5a16f..8de9fe8 100644 --- a/webapp/src/components/SettingsPage.tsx +++ b/webapp/src/components/SettingsPage.tsx @@ -82,6 +82,13 @@ function clearLegacyTotpSetupSecrets(): void { } } +function formatDateTime(value: string | null | undefined): string { + if (!value) return t('txt_dash'); + const date = new Date(value); + if (Number.isNaN(date.getTime())) return t('txt_dash'); + return date.toLocaleString(); +} + export default function SettingsPage(props: SettingsPageProps) { const [currentPassword, setCurrentPassword] = useState(''); const [newPassword, setNewPassword] = useState('');