forked from microsoft/github-copilot-vibe-coding-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.jsx
More file actions
33 lines (30 loc) · 958 Bytes
/
Copy pathApp.jsx
File metadata and controls
33 lines (30 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import {
BrowserRouter as Router,
Routes,
Route,
Navigate,
} from "react-router-dom";
import { AuthProvider } from "./context/AuthContext";
import HomePage from "./pages/HomePage";
import PostDetailPage from "./pages/PostDetailPage";
import SearchPage from "./pages/SearchPage";
import ProfilePage from "./pages/ProfilePage";
function App() {
return (
<AuthProvider>
<Router
future={{ v7_startTransition: true, v7_relativeSplatPath: true }}
>
<Routes>
<Route path="/" element={<HomePage />} />
<Route path="/post/:postId" element={<PostDetailPage />} />
<Route path="/search" element={<SearchPage />} />
<Route path="/profile" element={<ProfilePage />} />
<Route path="/profile/:userId" element={<ProfilePage />} />
<Route path="*" element={<Navigate to="/" replace />} />
</Routes>
</Router>
</AuthProvider>
);
}
export default App;