File tree Expand file tree Collapse file tree 4 files changed +64
-16
lines changed
Expand file tree Collapse file tree 4 files changed +64
-16
lines changed Original file line number Diff line number Diff line change 11import React from "react" ;
2- import "./App.scss" ;
2+ import { BrowserRouter as Router , Routes , Route } from "react-router-dom" ;
3+ import NavBar from "./Components/AddNavBar/NavBar" ;
34
45function App ( ) {
56 return (
6- < div className = "App" >
7- < header className = "App-header" >
8- < p >
9- Edit < code > src/App.tsx</ code > and save to reload.
10- </ p >
11- < a
12- className = "App-link"
13- href = "https://reactjs.org"
14- target = "_blank"
15- rel = "noopener noreferrer"
16- >
17- Learn React
18- </ a >
19- </ header >
20- </ div >
7+ < Router >
8+ < Routes >
9+ < Route path = "/" element = { < NavBar /> } />
10+ </ Routes >
11+ </ Router >
12+
2113 ) ;
2214}
2315
Original file line number Diff line number Diff line change 1+ @import " ../../Styles/GlobalStyles.scss" ;
2+
3+ body {
4+ background-color : $blueBackground ;
5+ font-family : $PublicSans ;
6+ }
7+
8+ .navBarContainer {
9+ display : flex ;
10+ background : $blueBackground ;
11+ justify-content : center ;
12+
13+ }
14+
15+ a {
16+ margin : 15px 10px 10px 10px ;
17+ background : $greyBackground ;
18+ color : $whiteFontColor ;
19+ background-color : $greyBackground ;
20+ box-shadow : 2px 2px $orangeBackground ;
21+ padding : 2.5px 20px ;
22+ text-align : center ;
23+ text-decoration : none ;
24+ display : inline-block ;
25+ border-radius : 25px ;
26+ }
27+
28+ a :active {
29+ box-shadow : 1px 1px $orangeBackground ;
30+ }
31+
32+ a :hover {
33+ color : $orangeBackground
34+ }
Original file line number Diff line number Diff line change 1+ import React from "react" ;
2+ import "./NavBar.scss"
3+ import { Link } from "react-router" ;
4+
5+
6+ export default function NavBar ( ) {
7+ return (
8+ < div >
9+ < header className = "navBarHeader" >
10+ < nav className = "navBarContainer" >
11+ < div >
12+ < Link to = "/" className = "homeButton" > Home</ Link >
13+ </ div >
14+ < div >
15+ < Link to = "profile" className = "profilePageButton" > Profile</ Link >
16+ </ div >
17+ </ nav >
18+ </ header >
19+
20+ </ div >
21+ ) ;
22+ }
You can’t perform that action at this time.
0 commit comments