// src/App.jsx
import { BrowserRouter, Routes, Route, Link, Outlet } from "react-router-dom";
function Sidebar() {
return (
);
}
function DashboardLayout() {
return (
);
}
function ProfilePage() {
return
Profile page
;
}
function SettingsPage() {
return
Settings page
;
}
function NotFoundPage() {
return
404 — Page not found
;
}
function App() {
return (
}>
} />
} />
} />
);
}
export default App;
/*
Notes:
- DashboardLayout (and its Sidebar) renders for both
/dashboard/profile and /dashboard/settings — only the content
inside changes between the two.
- The catch-all path="*" route is listed last, so it only matches
when nothing more specific (like /dashboard/profile) already did.
*/