import { createFileRoute, Outlet, redirect } from '@tanstack/react-router' import { AuthBrand } from '~/features/auth/auth-brand' import { getServerSession } from '~/server/better-auth/session' export const Route = createFileRoute('/auth')({ beforeLoad: async () => { const session = await getServerSession() if (session) { throw redirect({ to: '/' }) } }, component: AuthLayout, }) function AuthLayout() { return (
) }