-
Notifications
You must be signed in to change notification settings - Fork 200
Expand file tree
/
Copy pathNav.jsx
More file actions
72 lines (55 loc) · 1.61 KB
/
Nav.jsx
File metadata and controls
72 lines (55 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Nav.jsx
import styles from './Nav.module.css';
import Button from '../Elements/Button/Button';
import { Link, useLocation } from 'react-router-dom';
const Nav = () => {
const location = useLocation();
const navItems = [
{ path: '/', label: 'Home' },
{ path: '/Contributors', label: 'Contributors' },
{ path: '/contributors-map', label: 'Map' }
];
return (
<nav className={`${styles.nav} flex align-items-center`}>
<Link to="/" className={styles['logo-link']}>
<img
src="./img/Logo.gif"
alt="Before I Die Logo"
className={styles.imgfluid}
/>
</Link>
<div className={`${styles['navbar-nav']} flex align-items-center`}>
{navItems.map((item) => (
<Link
key={item.path}
to={item.path}
className={`${styles['nav-item']} ${
location.pathname === item.path ? styles.active : ''
}`}
>
{item.label}
</Link>
))}
</div>
<div className={styles['navbar-buttons']}>
<Button theme="matrix">
<a
href="https://github.com/BeforeIDieCode/BeforeIDieAchievements"
className={styles['github-link']}
target="_blank"
rel="noopener noreferrer"
>
<img
src="./img/GitHub Logo.png"
alt="GitHub Logo"
className={styles['github-logo']}
style={{ width: '40px', height: '40px' }}
/>
GitHub
</a>
</Button>
</div>
</nav>
);
};
export default Nav;