'use client' import {useMounted} from "@kri/common/hooks"; import {useAuth} from "@/hooks/useAuth"; import {useEffect} from "react"; import {useRouter} from "next/navigation"; import {Route} from "next"; function LoadingOverlay(props: { force: boolean }) { return null; } export default function MainPage() { const router = useRouter(); const mounted = useMounted(); const { auth } = useAuth(); useEffect(() => { if(auth && auth.user){ router.push("/performance" as Route); } }, [auth.user]) if (!mounted) return ; return null; }