File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -51,8 +51,9 @@ function App() {
5151 < Alert alert = { alert } />
5252 < div className = "container my-3" >
5353 < Routes >
54- < Route path = "/about" element = { < About /> } />
54+ < Route exact path = "/about" element = { < About /> } />
5555 < Route
56+ exact
5657 path = "/"
5758 element = {
5859 < TextForm
Original file line number Diff line number Diff line change 11import React from "react" ;
22import PropTypes from "prop-types" ;
3+ import { Link } from "react-router-dom" ;
34
45Navbar . propTypes = {
56 title : PropTypes . string . isRequired ,
@@ -16,9 +17,9 @@ export default function Navbar(props) {
1617 < nav
1718 className = { `navbar navbar-expand-lg navbar-${ props . mode } bg-${ props . mode } ` } >
1819 < div className = "container-fluid" >
19- < a className = "navbar-brand" href = "/" >
20+ < Link className = "navbar-brand" to = "/" >
2021 { props . title }
21- </ a >
22+ </ Link >
2223 < button
2324 className = "navbar-toggler"
2425 type = "button"
@@ -34,17 +35,17 @@ export default function Navbar(props) {
3435 id = "navbarSupportedContent" >
3536 < ul className = "navbar-nav me-auto mb-2 mb-lg-0" >
3637 < li className = "nav-item" >
37- < a
38+ < Link
3839 className = "nav-link active"
3940 aria-current = "page"
40- href = "/" >
41+ to = "/" >
4142 Home
42- </ a >
43+ </ Link >
4344 </ li >
4445 < li className = "nav-item" >
45- < a className = "nav-link" href = "/" >
46+ < Link className = "nav-link" to = "/about " >
4647 { props . aboutText }
47- </ a >
48+ </ Link >
4849 </ li >
4950 </ ul >
5051 < div
You can’t perform that action at this time.
0 commit comments