From 21c6aaa30b59c656e8b4361ebb0b040c18bf48f5 Mon Sep 17 00:00:00 2001 From: dadukhankevin Date: Wed, 19 Jul 2023 23:49:49 -0500 Subject: [PATCH] notify --- frontend/src/routes/(authenticated)/user/+page.svelte | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/routes/(authenticated)/user/+page.svelte b/frontend/src/routes/(authenticated)/user/+page.svelte index 73ae0068a..18f5b209a 100644 --- a/frontend/src/routes/(authenticated)/user/+page.svelte +++ b/frontend/src/routes/(authenticated)/user/+page.svelte @@ -11,14 +11,18 @@ import type { PageData } from './$types'; import { TrashIcon } from '$lib/icons'; import {onMount} from 'svelte'; + import {DialogResponse} from '$lib/components/modals'; + export let data: PageData; $: user = data?.user; $: userid = user?.id; let deleteModal: DeleteUserModal; async function openDeleteModal(): Promise { - await deleteModal.open(userid); - notifyWarning($t('account_settings.delete_success')) + let {response} = await deleteModal.open(userid); + if (response == DialogResponse.Submit){ + notifyWarning($t('account_settings.delete_success')) + } await goto('/logout'); } const formSchema = z.object({