Files
kandev/apps/web/lib/routing/server-navigation.ts
T
2026-06-18 18:36:48 +01:00

11 lines
243 B
TypeScript

export function redirect(url: string): never {
if (typeof window !== "undefined") {
window.location.assign(url);
}
throw new Error(`Redirect to ${url}`);
}
export function notFound(): never {
throw new Error("Route not found");
}