File tree 3 files changed +16
-3
lines changed
3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 1
- import { BrowserRouter as Router } from 'react-router-dom' ;
1
+ import { BrowserRouter as Router , Routes , Route } from 'react-router-dom' ;
2
2
import './css/App.css' ;
3
3
import AppHeader from './components/AppHeader' ;
4
4
import AppFooter from './components/AppFooter' ;
5
- import Home from './pages' ;
5
+ import Home from './pages/Home' ;
6
+ import About from './pages/about' ;
6
7
7
8
function App ( ) {
8
9
return (
9
10
< div className = "App" >
10
11
< Router >
11
12
< AppHeader > </ AppHeader >
12
- < Home />
13
+ < Routes >
14
+ < Route path = "/" element = { < Home /> } />
15
+ < Route path = "about" element = { < About /> } />
16
+ </ Routes >
13
17
< AppFooter > </ AppFooter >
14
18
</ Router >
15
19
</ div >
Original file line number Diff line number Diff line change
1
+ const About = ( ) => {
2
+ return (
3
+ < div >
4
+ < h1 > This is the About me page</ h1 >
5
+ </ div >
6
+ ) ;
7
+ } ;
8
+
9
+ export default About ;
File renamed without changes.
You can’t perform that action at this time.
0 commit comments