Skip to content

Commit facbb39

Browse files
committed
feat: update projects
1 parent 94aeea3 commit facbb39

20 files changed

+303
-154
lines changed

src/App.tsx

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,34 @@
1+
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
12
import Header from "./components/Header";
23
import About from "./components/About";
34
import Projects from "./components/Projects";
5+
import ProjectDetail from "./components/ProjectDetail";
46
import Footer from "./components/Footer";
7+
import ScrollToTop from "./components/ScrollToTop";
58

69
function App() {
710
return (
8-
<div>
9-
<Header />
10-
<main className="container mx-auto mt-20">
11-
<About />
12-
<Projects />
13-
</main>
14-
<Footer />
15-
</div>
11+
<Router>
12+
<ScrollToTop />
13+
<div>
14+
<Header />
15+
<main className="container mx-auto mt-20">
16+
<Routes>
17+
<Route
18+
path="/"
19+
element={
20+
<>
21+
<About />
22+
<Projects />
23+
</>
24+
}
25+
/>
26+
<Route path="/projects/:projectId" element={<ProjectDetail />} />
27+
</Routes>
28+
</main>
29+
<Footer />
30+
</div>
31+
</Router>
1632
);
1733
}
1834

50.1 KB
Loading
55.9 KB
Loading
49 KB
Loading
44.2 KB
Loading
47.8 KB
Loading
43.9 KB
Loading
55.2 KB
Loading
23.5 KB
Loading
542 KB
Loading

0 commit comments

Comments
 (0)