-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLoggedOutNav.jsx
75 lines (72 loc) · 1.9 KB
/
LoggedOutNav.jsx
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
73
74
75
import logo from '../images/Logo.svg';
import arrow from '../images/arrow.svg';
import Image from 'next/image';
import styles from '../css/loggedOutNav.module.css';
import React, { useState } from 'react';
import { useRouter } from 'next/router';
import Link from 'next/link';
import Button from './Button';
import { GiHamburgerMenu } from 'react-icons/gi';
import Modal from './Modal';
import LoginAsTest from './LoginAsTest';
export default function LoggedOutNav() {
const router = useRouter();
const [showModal, setShowModal] = useState(false);
const modal = (
<Modal setShowModal={setShowModal} showModal={showModal}>
<Button
label="Login"
type="primary"
size="medium"
onClick={() => {
router.push('/login');
}}
/>
<Button
label="Try Code Circle free"
type="secondary"
size="medium"
image={arrow}
onClick={() => {
router.push('/create-an-account');
}}
/>
</Modal>
);
return (
<nav>
<div className={styles.navContainer}>
<Link href="/">
<Image className={styles.logoStyle} alt="logo" src={logo} />
</Link>
{modal}
<GiHamburgerMenu
onClick={() => {
setShowModal(!showModal);
}}
className={styles.hamburgerMenuStyle}
/>
<div className={styles.buttonContainerStyle}>
<Button
label="Login"
type="primary"
size="medium"
onClick={() => {
router.push('/login');
}}
/>
<Button
label="Try Code Circle free"
type="secondary"
size="medium"
image={arrow}
onClick={() => {
router.push('/create-an-account');
}}
/>
<LoginAsTest nav={true} />
</div>
</div>
</nav>
);
}