import { Navigate, Outlet, useLocation } from "react-router-dom"; import { useAuth } from "../lib/auth/AuthContext.js"; export function ProtectedRoute() { const { status } = useAuth(); const location = useLocation(); if (status === "loading") { return (
); } if (status === "anonymous") { return ; } return ; }