import { Navigate, Outlet } from "react-router-dom";
import { useAuth } from "../context/auth_context";

export const LoginRoute = () => {
    const {user} = useAuth();
    if(user){
        return <Navigate to="/" replace={true}/>;
    }
    return <Outlet/>;
}