Skip to content

Commit 9d72c92

Browse files
committed
Use react router and router link
1 parent c4aa9e8 commit 9d72c92

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

src/App.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { BrowserRouter as Router } from 'react-router-dom';
12
import './css/App.css';
23
import AppHeader from './components/AppHeader';
34
import AppFooter from './components/AppFooter';
@@ -6,9 +7,11 @@ import Home from './pages';
67
function App() {
78
return (
89
<div className="App">
9-
<AppHeader></AppHeader>
10-
<Home />
11-
<AppFooter></AppFooter>
10+
<Router>
11+
<AppHeader></AppHeader>
12+
<Home />
13+
<AppFooter></AppFooter>
14+
</Router>
1215
</div>
1316
);
1417
}

src/components/ProjectSingle.js

+9-5
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,21 @@ const ProjectSingle = () => {
44
return (
55
<Link
66
to="/projects/single-project"
7-
class="rounded-3xl shadow-lg hover:shadow-xl cursor-pointer mb-10 sm:mb-0 bg-secondary-light dark:bg-ternary-dark"
7+
className="rounded-3xl shadow-lg hover:shadow-xl cursor-pointer mb-10 sm:mb-0 bg-secondary-light dark:bg-ternary-dark"
88
aria-label="Single Project"
99
>
1010
<div>
11-
<img src="" class="rounded-t-3xl border-none" />
11+
<img
12+
src="assets/images/project.jpg"
13+
className="rounded-t-3xl border-none"
14+
alt="Single Project"
15+
/>
1216
</div>
13-
<div class="text-center px-4 py-6">
14-
<p class="text-2xl text-ternary-dark dark:text-ternary-light font-semibold mb-2">
17+
<div className="text-center px-4 py-6">
18+
<p className="text-2xl text-ternary-dark dark:text-ternary-light font-semibold mb-2">
1519
A Simple Project
1620
</p>
17-
<span class="text-lg text-ternary-dark dark:text-ternary-light">
21+
<span className="text-lg text-ternary-dark dark:text-ternary-light">
1822
Here is the description
1923
</span>
2024
</div>

src/components/ProjectsGrid.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { FiSearch } from 'react-icons/fi';
2+
import ProjectSingle from './ProjectSingle';
23

34
const ProjectsGrid = () => {
45
return (
@@ -91,7 +92,7 @@ const ProjectsGrid = () => {
9192
:key="project.id"
9293
:project="project"
9394
/> */}
94-
A single project
95+
<ProjectSingle></ProjectSingle>
9596
</div>
9697
{/* Projects grid end */}
9798
</section>

0 commit comments

Comments
 (0)