The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import { createFileRoute, redirect } from "@tanstack/react-router"; |
| 2 | |
| 3 | export const Route = createFileRoute("/projects/$projectKey")({ |
| 4 | beforeLoad: async ({ context, params }) => { |
| 5 | if ( |
| 6 | context.authGateState.status !== "authenticated" && |
| 7 | context.authGateState.status !== "hosted-static" |
| 8 | ) { |
| 9 | throw redirect({ to: "/pair", replace: true }); |
| 10 | } |
| 11 | throw redirect({ |
| 12 | to: "/settings/projects", |
| 13 | search: { project: params.projectKey, machine: undefined }, |
| 14 | replace: true, |
| 15 | }); |
| 16 | }, |
| 17 | }); |