Skip to content

Commit 32f0daf

Browse files
author
Sathya Sreenivasan
committed
Added nav links to home and profile pages
1 parent 55c4ca0 commit 32f0daf

File tree

4 files changed

+64
-16
lines changed

4 files changed

+64
-16
lines changed

src/App.tsx

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,15 @@
11
import 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

45
function 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

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
}

src/Components/AddNavBar/NavBarPage.tsx

Whitespace-only changes.

0 commit comments

Comments
 (0)