Last active
January 24, 2025 17:23
-
-
Save abteilung/cc2830cd9cbcce16b9e36e8e29285e92 to your computer and use it in GitHub Desktop.
Sveltekit Redirect in a +page.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { redirect } from "@sveltejs/kit"; | |
/** @type {import('./$types').PageLoad} */ | |
export function load() { | |
redirect(302, "/academy/"); // needs `throw` in v1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment