import { createFileRoute, useRouter } from "@tanstack/react-router"; import { Button } from "../components/ui/button"; import { Card, CardContent, CardHeader } from "../components/ui/card"; import { trackLstEvent } from "../lib/umami.utils"; export const Route = createFileRoute("/forbidden")({ component: RouteComponent, }); function RouteComponent() { const click = () => { trackLstEvent("forbidden_click", { module: "forbidden", action: "click", label: "redirect", page: window.location.pathname, }); router.navigate({ to: "/", replace: true }); }; const router = useRouter(); return (
Oops, you shouldn't have done that
Your have tried to go to a page that you are not authorized to be at.