File tree 1 file changed +11
-27
lines changed
1 file changed +11
-27
lines changed Original file line number Diff line number Diff line change 1
1
import React from "react" ;
2
2
3
- import { BrowserRouter as Router , Switch , Route } from " react-router-dom" ;
3
+ import { BrowserRouter as Router , Routes , Route } from ' react-router-dom'
4
4
5
5
import Home from "./components/Home/Home" ;
6
6
@@ -13,32 +13,16 @@ const App = () => {
13
13
return (
14
14
< Router >
15
15
< >
16
- < Switch >
17
- < Route exact path = "/" >
18
- < Home />
19
- </ Route >
20
- < Route path = "/project" >
21
- < Project />
22
- </ Route >
23
- < Route exact path = "/about" >
24
- < Home section = "about" />
25
- </ Route >
26
- < Route exact path = "/experience" >
27
- < Home section = "experience" />
28
- </ Route >
29
- < Route exact path = "/projects" >
30
- < Home section = "projects" />
31
- </ Route >
32
- < Route exact path = "/contact" >
33
- < Home section = "contact" />
34
- </ Route >
35
- < Route path = "/cv" >
36
- < ComingSoon />
37
- </ Route >
38
- < Route path = "*" >
39
- < PageNotFound />
40
- </ Route >
41
- </ Switch >
16
+ < Routes >
17
+ < Route exact path = "/" element = { < Home /> } />
18
+ < Route path = "/project" element = { < Project /> } />
19
+ < Route exact path = "/about" element = { < Home section = "about" /> } />
20
+ < Route exact path = "/experience" element = { < Home section = "experience" /> } />
21
+ < Route exact path = "/projects" element = { < Home section = "projects" /> } />
22
+ < Route exact path = "/contact" element = { < Home section = "contact" /> } />
23
+ < Route path = "/cv" element = { < ComingSoon /> } />
24
+ < Route path = "*" element = { < PageNotFound /> } />
25
+ </ Routes >
42
26
</ >
43
27
</ Router >
44
28
) ;
You can’t perform that action at this time.
0 commit comments