App: Use /racepicks as default page (reroute / + change Formula11 button destination)

This commit is contained in:
2025-01-31 00:45:30 +01:00
parent 0985936c64
commit 01d58e3d1e
4 changed files with 18 additions and 7 deletions

10
src/hooks.ts Normal file
View File

@ -0,0 +1,10 @@
import type { Reroute } from "@sveltejs/kit";
const rerouted: Record<string, string> = {};
// NOTE: This does not change the browser's address bar (the route path)!
export const reroute: Reroute = ({ url }) => {
if (url.pathname in rerouted) {
return rerouted[url.pathname];
}
};

View File

@ -290,8 +290,9 @@
</div> </div>
<!-- Site logo --> <!-- Site logo -->
<Button href="/" color="primary"><span class="text-xl font-bold">Formula 11</span></Button <Button href="/racepicks" color="primary">
> <span class="text-xl font-bold">Formula 11</span>
</Button>
</div> </div>
</svelte:fragment> </svelte:fragment>

View File

@ -1,5 +0,0 @@
<svelte:head>
<title>F11 - Formula 11</title>
</svelte:head>
<h1>Formula 11</h1>

5
src/routes/+page.ts Normal file
View File

@ -0,0 +1,5 @@
import { redirect } from "@sveltejs/kit";
export function load() {
redirect(302, "/racepicks");
}