Skip to content

Commit 6045f64

Browse files
committed
Change navigation to Hello and World
1 parent 6e00051 commit 6045f64

File tree

4 files changed

+12
-46
lines changed

4 files changed

+12
-46
lines changed

src/components/navigation/NavigationBar.module.scss

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,28 +35,14 @@
3535

3636
.container {
3737
display: flex;
38-
justify-content: space-between;
38+
justify-content: flex-end;
3939
padding: 0;
4040

4141
@include break.under(medium) {
4242
flex-direction: column;
4343
}
4444
}
4545

46-
.about {
47-
color: config.$nav-bar-logo-text-color;
48-
font-weight: 700;
49-
padding: 15px 0;
50-
51-
@include break.under(medium) {
52-
padding: 8px 0 0;
53-
}
54-
55-
&:hover {
56-
color: config.$nav-bar-logo-hover-text-color;
57-
}
58-
}
59-
6046
.button {
6147
a {
6248
color: inherit;

src/components/navigation/NavigationBar.test.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,13 @@ import NavigationBar from "./NavigationBar";
44

55
describe("`NavigationBar`", () => {
66
describe("render", () => {
7-
it("should include NavLinks for all 5 sections", () => {
7+
it("should include NavLinks for all 2 sections", () => {
88
const wrapper = shallow(<NavigationBar />);
9-
109
const navLinks = wrapper.find("NavLink");
1110

12-
expect(navLinks).toHaveLength(5);
13-
expect(navLinks.at(0).prop("to")).toBe("/about");
14-
expect(navLinks.at(1).prop("to")).toBe("/skills");
15-
expect(navLinks.at(2).prop("to")).toBe("/projects");
16-
expect(navLinks.at(3).prop("to")).toBe("/resume");
17-
expect(navLinks.at(4).prop("to")).toBe("/contact");
11+
expect(navLinks).toHaveLength(2);
12+
expect(navLinks.at(0).prop("to")).toBe("/hello");
13+
expect(navLinks.at(1).prop("to")).toBe("/world");
1814
});
1915
});
2016
});

src/components/navigation/NavigationBar.tsx

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,16 @@ export default function NavigationBar(): JSX.Element {
1111
<h2 className={styles.invisibleButOutlineReadable}>Navigation</h2>
1212
</div>
1313
<div className={styles.container}>
14-
<NavLink to="/about" activeClassName="activeNavSection">
15-
<div className={styles.about}>Hi, I&apos;m Darga.</div>
16-
</NavLink>
17-
1814
<ul>
1915
<li className={styles.button}>
20-
<NavLink to="/skills" activeClassName="activeNavSection">
21-
Skills
22-
</NavLink>
23-
</li>
24-
25-
<li className={styles.button}>
26-
<NavLink to="/projects" activeClassName="activeNavSection">
27-
Projects
28-
</NavLink>
29-
</li>
30-
31-
<li className={styles.button}>
32-
<NavLink to="/resume" activeClassName="activeNavSection">
33-
Resume
16+
<NavLink to="/hello" activeClassName="activeNavSection">
17+
Hello
3418
</NavLink>
3519
</li>
3620

3721
<li className={styles.button}>
38-
<NavLink to="/contact" activeClassName="activeNavSection">
39-
Contact
22+
<NavLink to="/world" activeClassName="activeNavSection">
23+
World
4024
</NavLink>
4125
</li>
4226
</ul>

src/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ function App(): JSX.Element {
2929
</header>
3030

3131
<Switch>
32-
<Route path="/about" component={AboutSection} />
33-
<Route path="/skills" component={SkillsSectionContainer} />
32+
<Route path="/hello" component={AboutSection} />
33+
<Route path="/world" component={SkillsSectionContainer} />
3434

35-
<Redirect from="/" to="about" />
35+
<Redirect from="/" to="hello" />
3636
</Switch>
3737
</div>
3838
</Router>

0 commit comments

Comments
 (0)