From 54a5e73117b1bc3421cc5297d9b1c19f69bef0eb Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Fri, 30 Dec 2022 15:32:51 +0100 Subject: [PATCH] fix login redirection --- frontend/src/lib/logout.ts | 2 ++ .../(root)/(logged)/user/(user)/workspaces/+page.svelte | 8 ++------ frontend/src/routes/(root)/+layout.svelte | 4 +++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/src/lib/logout.ts b/frontend/src/lib/logout.ts index 83726fd171..dee90456f9 100644 --- a/frontend/src/lib/logout.ts +++ b/frontend/src/lib/logout.ts @@ -4,6 +4,8 @@ import { clearStores } from './stores.js' import { sendUserToast } from './utils.js' export async function logoutWithRedirect(rd?: string): Promise { + console.log('logoutWithRedirect', rd) + await clearUser() if (rd && rd?.split('?')[0] != '/user/login') { const error = document.cookie.includes('token') diff --git a/frontend/src/routes/(root)/(logged)/user/(user)/workspaces/+page.svelte b/frontend/src/routes/(root)/(logged)/user/(user)/workspaces/+page.svelte index 96f7752f89..78b0c3a015 100644 --- a/frontend/src/routes/(root)/(logged)/user/(user)/workspaces/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/user/(user)/workspaces/+page.svelte @@ -72,9 +72,7 @@

Workspaces{#if loading} + >Workspaces{#if loading} {/if}

@@ -125,9 +123,7 @@

Invites to join a Workspace

{#if invites.length == 0} -

- You don't have new invites at the moment. -

+

You don't have new invites at the moment.

{/if} {#each invites as invite}