import React from 'react'; import { Navigate, Outlet, useLocation } from 'react-router-dom'; import { useAuth } from './useAuth'; const ProtectedRoute = () => { const { session, loading } = useAuth(); const location = useLocation(); if (loading) { return (