chore: temporarily disable login/signup and profile routes
Comment out auth navigation in Header and MobileNav. Add redirect-to-home layout guards on /auth/* and /profile/* routes.
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
<!-- Desktop nav -->
|
||||
<nav class="hidden items-center gap-6 md:flex">
|
||||
<a href="/" class="text-sm font-medium text-primary-200 hover:text-white">Suche</a>
|
||||
<!-- TODO: re-enable auth nav when login/signup is ready
|
||||
{#if user}
|
||||
<a href="/profile" class="text-sm font-medium text-primary-200 hover:text-white">Profil</a>
|
||||
<form method="POST" action="/auth/abmelden">
|
||||
@@ -44,6 +45,7 @@
|
||||
Anmelden
|
||||
</a>
|
||||
{/if}
|
||||
-->
|
||||
<ThemeToggle />
|
||||
</nav>
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<a href="/" class="text-sm font-medium text-primary-200 hover:text-white" onclick={onclose}>
|
||||
Suche
|
||||
</a>
|
||||
<!-- TODO: re-enable auth nav when login/signup is ready
|
||||
{#if user}
|
||||
<a href="/profile" class="text-sm font-medium text-primary-200 hover:text-white" onclick={onclose}>
|
||||
Profil
|
||||
@@ -29,5 +30,6 @@
|
||||
Anmelden
|
||||
</a>
|
||||
{/if}
|
||||
-->
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
7
web/src/routes/auth/+layout.server.ts
Normal file
7
web/src/routes/auth/+layout.server.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
// TODO: remove this redirect when login/signup is re-enabled
|
||||
import { redirect } from '@sveltejs/kit';
|
||||
import type { LayoutServerLoad } from './$types';
|
||||
|
||||
export const load: LayoutServerLoad = () => {
|
||||
redirect(302, '/');
|
||||
};
|
||||
7
web/src/routes/profile/+layout.server.ts
Normal file
7
web/src/routes/profile/+layout.server.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
// TODO: remove this redirect when login/signup is re-enabled
|
||||
import { redirect } from '@sveltejs/kit';
|
||||
import type { LayoutServerLoad } from './$types';
|
||||
|
||||
export const load: LayoutServerLoad = () => {
|
||||
redirect(302, '/');
|
||||
};
|
||||
Reference in New Issue
Block a user