import React from 'react'; import { Navigate, Outlet } from 'react-router-dom'; import useAuthStore from '../../store/authStore'; const ProtectedRoute = () => { // Grab the state directly from your Zustand store const { isAuthenticated, isLoading } = useAuthStore(); // 1. App is currently pinging Django to verify the HttpOnly cookie if (isLoading) { return (