diff --git a/src/routes/(main)/logout/+page.server.ts b/src/routes/(main)/logout/+page.server.ts index 886a7be..7184399 100644 --- a/src/routes/(main)/logout/+page.server.ts +++ b/src/routes/(main)/logout/+page.server.ts @@ -1,7 +1,8 @@ -import { redirect } from "@sveltejs/kit" -import type { Actions, PageServerLoad } from "./$types" +import redirect from "@sveltejs/kit" +import type { Actions } from './$types'; -export const load: PageServerLoad = async ({ cookies }) => { - cookies.delete("UserSession") - redirect(303, "/") -} +export const actions: Actions = { + default: async ({cookies}) => { + cookies.delete("UserSession") + } +} satisfies Actions; diff --git a/src/routes/(main)/logout/+page.svelte b/src/routes/(main)/logout/+page.svelte index 7560511..61da226 100644 --- a/src/routes/(main)/logout/+page.svelte +++ b/src/routes/(main)/logout/+page.svelte @@ -1,12 +1,7 @@ -

Log Out

+
+

Log out

+ +