Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: fix account deletion not working

ammarahm-ed33c939f5caf2
diff --git a/apps/web/src/common/dialog-controller.tsx b/apps/web/src/common/dialog-controller.tsx
index c93079a7d..8e9036a18 100644
--- a/apps/web/src/common/dialog-controller.tsx
+++ b/apps/web/src/common/dialog-controller.tsx
@@ -430,7 +430,7 @@ function getDialogData(type: string) {
export function showPasswordDialog(
type: string,
- validate: (password: string) => boolean | Promise<boolean>
+ validate: ({ password }: { password: string }) => boolean | Promise<boolean>
) {
const { title, subtitle, positiveButtonText, checks } = getDialogData(type);
return showDialog("PasswordDialog", (Dialog, perform) => (
diff --git a/apps/web/src/dialogs/settings/profile-settings.ts b/apps/web/src/dialogs/settings/profile-settings.ts
index e6e2f4658..e310e56dc 100644
--- a/apps/web/src/dialogs/settings/profile-settings.ts
+++ b/apps/web/src/dialogs/settings/profile-settings.ts
@@ -102,7 +102,7 @@ export const ProfileSettings: SettingsGroup[] = [
variant: "error",
title: "Delete account",
action: async () =>
- showPasswordDialog("delete_account", async (password) => {
+ showPasswordDialog("delete_account", async ({ password }) => {
await db.user?.deleteUser(password);
return true;
})