diff --git a/src/lib/layout/unauthenticated.svelte b/src/lib/layout/unauthenticated.svelte
index 62d9e923b..1028e4f0a 100644
--- a/src/lib/layout/unauthenticated.svelte
+++ b/src/lib/layout/unauthenticated.svelte
@@ -4,6 +4,7 @@
import LoginDark from '$lib/images/login/login-dark-mode.svg';
import { app } from '$lib/stores/app';
import { base } from '$app/paths';
+ import { user } from '$lib/stores/user';
const technologies = [
'js',
@@ -25,7 +26,7 @@
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index 43965143d..bdaa9a1ad 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -49,11 +49,16 @@
if (!$page.url.pathname.startsWith('/auth')) {
const acceptedRoutes = ['/login', '/register', '/recover', '/invite'];
if ($user) {
- if (!$page.url.pathname.startsWith('/console')) {
+ if (
+ !$page.url.pathname.startsWith('/console') &&
+ !$page.url.pathname.startsWith('/invite')
+ ) {
+ console.log('test');
await goto(`${base}/console`, {
replaceState: true
});
}
+ loading.set(false);
} else {
if (acceptedRoutes.includes($page.url.pathname)) {
await goto(`${base}${$page.url.pathname}${$page.url.search}`);