import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom'; import { AuthProvider, useAuth } from './AuthContext'; import Layout from './components/Layout'; import Login from './pages/Login'; import Dashboard from './pages/Dashboard'; import Transactions from './pages/Transactions'; import Transfers from './pages/Transfers'; function ProtectedRoute({ children }: { children: React.ReactNode }) { const { isAuthenticated } = useAuth(); return isAuthenticated ? <>{children} : ; } function AppRoutes() { const { isAuthenticated } = useAuth(); return ( : } /> } > } /> } /> } /> ); } export default function App() { return ( ); }