1import { createFileRoute, redirect } from "@tanstack/react-router";
2
3import { UsagePage } from "../components/usage/UsagePage";
4
5export const Route = createFileRoute("/usage")({
6 beforeLoad: async ({ context }) => {
7 if (
8 context.authGateState.status !== "authenticated" &&
9 context.authGateState.status !== "hosted-static"
10 ) {
11 throw redirect({ to: "/pair", replace: true });
12 }
13 },
14 component: UsagePage,
15});