mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 07:54:22 +00:00
Add DeleteAccountModal and EmailPasswordModal tests
This commit is contained in:
@@ -153,7 +153,7 @@ const AccountSettings: React.FC<AccountSettingsProps> = ({
|
||||
}
|
||||
};
|
||||
|
||||
const handleEmailConfirm = async (password: string): Promise<void> => {
|
||||
const handleEmailConfirm = async (password: string): Promise<boolean> => {
|
||||
const updates: UserProfileSettings = {
|
||||
...state.localSettings,
|
||||
currentPassword: password,
|
||||
@@ -181,6 +181,11 @@ const AccountSettings: React.FC<AccountSettingsProps> = ({
|
||||
dispatch({ type: SettingsActionType.MARK_SAVED });
|
||||
setEmailModalOpened(false);
|
||||
onClose();
|
||||
return true;
|
||||
} else {
|
||||
// TODO: Handle errors appropriately
|
||||
// notifications.show({...
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user