﻿import { Outlet } from "react-router-dom";
import Login from "./Login.tsx";

export default function ProtectedRoute({user, setUser} : {user: string | null, setUser: (user: string | null) => void})
{
    if (user === null)
    {
        return <Login setToken={setUser}/>;
    }

    return <Outlet />;
}