From 27b5328c5b6852ad6b0fb7ffd7609a649285a74b Mon Sep 17 00:00:00 2001 From: TZGyn Date: Thu, 2 May 2024 10:00:49 +0800 Subject: [PATCH] revert back to invalidate all when update shortener --- .../src/routes/(app)/links/[id]/edit/(components)/form.svelte | 4 ++-- .../[id]/links/[linkid]/edit/(components)/form.svelte | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/routes/(app)/links/[id]/edit/(components)/form.svelte b/frontend/src/routes/(app)/links/[id]/edit/(components)/form.svelte index 6507b75..3f14272 100644 --- a/frontend/src/routes/(app)/links/[id]/edit/(components)/form.svelte +++ b/frontend/src/routes/(app)/links/[id]/edit/(components)/form.svelte @@ -22,8 +22,8 @@ const form = superForm(data, { validators: zodClient(formSchema), - invalidateAll: false, - resetForm: false, + invalidateAll: 'force', + resetForm: true, onResult: ({ result }) => { if (result.status === 200) { toast.success('Project shortener updated') diff --git a/frontend/src/routes/(app)/projects/[id]/links/[linkid]/edit/(components)/form.svelte b/frontend/src/routes/(app)/projects/[id]/links/[linkid]/edit/(components)/form.svelte index 8309713..a7ff294 100644 --- a/frontend/src/routes/(app)/projects/[id]/links/[linkid]/edit/(components)/form.svelte +++ b/frontend/src/routes/(app)/projects/[id]/links/[linkid]/edit/(components)/form.svelte @@ -18,8 +18,8 @@ const form = superForm(data, { validators: zodClient(formSchema), - invalidateAll: false, - resetForm: false, + invalidateAll: 'force', + resetForm: true, onResult: ({ result }) => { if (result.status === 200) { toast.success('Project shortener updated')