import React from 'react'; import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom'; import Layout from './components/Layout'; import Auth from './pages/Auth'; import Dashboard from './pages/Dashboard'; import Transactions from './pages/Transactions'; import Debts from './pages/Debts'; import Incomes from './pages/Incomes'; import Settings from './pages/Settings'; function PrivateRoute({ children }) { const token = localStorage.getItem('token'); return token ? {children} : ; } export default function App() { return ( } /> } /> } /> } /> } /> } /> ); }