import { Navigate } from "react-router";
import { useAuthContext } from "@/providers/auth-context";
import { Box, CircularProgress } from "@mui/material";
interface GuestRouteProps {
children: React.ReactNode;
}
export function GuestRoute({ children }: GuestRouteProps) {
const { isAuthenticated, isLoading } = useAuthContext();
if (isLoading) {
return (
);
}
if (isAuthenticated) {
return ;
}
return children;
}