import { Routes, Route, Navigate } from 'react-router-dom'; import { useAuthStore } from './store/auth'; import Login from './pages/Login'; import MainLayout from './layouts/MainLayout'; function PrivateRoute({ children }: { children: React.ReactNode }) { const isAuthenticated = useAuthStore((state) => state.isAuthenticated); return isAuthenticated ? <>{children} : ; } export default function App() { return ( } /> } /> ); }