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