import { createFileRoute, useRouter } from "@tanstack/react-router"; import z from "zod"; import { Button } from "../components/ui/button"; import { Card, CardContent, CardHeader } from "../components/ui/card"; import { trackLstEvent } from "../lib/umami.utils"; export const Route = createFileRoute("/app-down")({ validateSearch: z.object({ redirect: z.string().optional(), }), component: RouteComponent, }); function RouteComponent() { const search = Route.useSearch(); const redirectPath = search.redirect ?? "/"; const router = useRouter(); const click = () => { trackLstEvent("app_down_click", { module: "app", action: "click", label: "redirect", page: window.location.pathname, }); router.navigate({ to: redirectPath, replace: true }); }; return (

Oops, you shouldn't have done that

Your have tried to go to a page that you are not authorized to be at.

); }