fix(web): the Usage page sends a signed-out browser to pairing (#17938)
Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
2e194f8071
commit
b4542c5418
1 file changed
+9
-1
@@ -1,7 +1,15 @@
|
||||
import { createFileRoute } from "@tanstack/react-router";
|
||||
import { createFileRoute, redirect } from "@tanstack/react-router";
|
||||
|
||||
import { UsagePage } from "../components/usage/UsagePage";
|
||||
|
||||
export const Route = createFileRoute("/usage")({
|
||||
beforeLoad: async ({ context }) => {
|
||||
if (
|
||||
context.authGateState.status !== "authenticated" &&
|
||||
context.authGateState.status !== "hosted-static"
|
||||
) {
|
||||
throw redirect({ to: "/pair", replace: true });
|
||||
}
|
||||
},
|
||||
component: UsagePage,
|
||||
});
|
||||
Reference in new issue
Block a user