Skip to content

Commit b4542c5

Browse files
fix(web): the Usage page sends a signed-out browser to pairing (#17938)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 2e194f8 commit b4542c5

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎apps/web/src/routes/usage.tsx‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
import { createFileRoute } from "@tanstack/react-router";
1+
import { createFileRoute, redirect } from "@tanstack/react-router";
22

33
import { UsagePage } from "../components/usage/UsagePage";
44

55
export 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+
},
614
component: UsagePage,
715
});

0 commit comments

Comments
 (0)