Skip to content
Source
Sign inSign up

approve-agent.tsx

14 lines501 Bytes

1import { createFileRoute, redirect } from "@tanstack/react-router";
2​
3import { hasCloudPublicConfig } from "../cloud/publicConfig";
4import { ApproveAgentSurface } from "../components/auth/ApproveAgentSurface";
5import { isHostedStaticApp } from "../hostedPairing";
6​
7export const Route = createFileRoute("/approve-agent")({
8 beforeLoad: () => {
9 if (!isHostedStaticApp() || !hasCloudPublicConfig()) {
10 throw redirect({ to: "/", replace: true });
11 }
12 },
13 component: ApproveAgentSurface,
14});