mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-23 19:49:56 +01:00
web: add confirmation dialog for delete data option
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
This commit is contained in:
@@ -107,9 +107,17 @@ export const ProfileSettings: SettingsGroup[] = [
|
||||
variant: "error",
|
||||
title: strings.deleteData(),
|
||||
action: async () => {
|
||||
Config.clear();
|
||||
await db.reset();
|
||||
window.location.reload();
|
||||
const ok = await ConfirmDialog.show({
|
||||
title: strings.deleteData(),
|
||||
message: strings.deleteAccountDesc(),
|
||||
positiveButtonText: strings.yes(),
|
||||
negativeButtonText: strings.no()
|
||||
});
|
||||
if (ok) {
|
||||
Config.clear();
|
||||
await db.reset();
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user