summaryrefslogtreecommitdiff
path: root/react/07-react-router/src/App.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'react/07-react-router/src/App.jsx')
-rw-r--r--react/07-react-router/src/App.jsx30
1 files changed, 30 insertions, 0 deletions
diff --git a/react/07-react-router/src/App.jsx b/react/07-react-router/src/App.jsx
new file mode 100644
index 0000000..ab7d824
--- /dev/null
+++ b/react/07-react-router/src/App.jsx
@@ -0,0 +1,30 @@
+import { Routes, Route } from "react-router";
+
+import Navbar from "./components/Navbar";
+import HomePage from "./pages/HomePage"
+import AboutPage from "./pages/AboutPage"
+import AuthLayout from "./features/auth/layouts/AuthLayout"
+import Login from "./features/auth/components/Login"
+import Register from "./features/auth/components/Register"
+import PostList from "./features/posts/components/PostList"
+
+function App() {
+ return (
+ <div className="app">
+ <Navbar/>
+
+ <Routes>
+ <Route index element={<HomePage />} />
+ <Route path="about" element={<AboutPage />} />
+ <Route path="Posts" element={<PostList />} />
+
+ <Route element={<AuthLayout />}>
+ <Route path="login" element={<Login />} />
+ <Route path="register" element={<Register />} />
+ </Route>
+ </Routes>
+ </div>
+ )
+}
+
+export default App