Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 1x 1x 1x 1x 5x 5x 5x 2x 2x 5x 1x | import { createFileRoute, redirect } from '@tanstack/react-router';
import { getAuthStatus } from '@web/api/v1/super-agents/auth';
export const Route = createFileRoute('/login')({
beforeLoad: async () => {
const authData = await getAuthStatus();
if (!authData) return;
if (!authData.authRequired || authData.authenticated) {
throw redirect({ to: '/agents' });
}
},
});
|