MainNav.js 1.2 KB
Newer Older
Kim, Subin's avatar
Kim, Subin committed
1
import React, { useState, useEffect, useRef } from 'react';
Kim, Subin's avatar
Kim, Subin committed
2
import { Navbar, Nav } from 'react-bootstrap';
3
import logo from '../footprint.svg';
Kim, Subin's avatar
Kim, Subin committed
4
5
import cart from '../cart.svg';
import option from '../option.svg';
Kim, Subin's avatar
Kim, Subin committed
6
7

function MainNav() {
Kim, Subin's avatar
Kim, Subin committed
8
9
10
    function handleClick() {
        alert('로그아웃이 완료되었습니다.')
    }
Kim, Subin's avatar
Kim, Subin committed
11
12

    return (
Kim, Subin's avatar
Kim, Subin committed
13
14
15
        <Navbar sticky="top" style={{ background: "#CDC5C2" }}>
            <Navbar.Brand href="/home" className="text-light">
                <img src={logo} width="24" height="24" />
Kim, Subin's avatar
Kim, Subin committed
16
17
18
                {' '}KU#
            </Navbar.Brand>
            <Nav className="justify-content-end">
Kim, Subin's avatar
Kim, Subin committed
19
20
                <Nav.Link className="text-light" href="/login">Login</Nav.Link>
                <Nav.Link className="text-light" href="/signup">Signup</Nav.Link>
Kim, Subin's avatar
Kim, Subin committed
21
22
23
                <Nav.Link href="/shoppingcart">
                    <img src={cart} width="30" height="30" />
                </Nav.Link>
Kim, Subin's avatar
Kim, Subin committed
24
25
                <Nav.Link className="text-light" onClick={() => handleClick()}>Logout</Nav.Link>
                <Nav.Link href="/admin">
Kim, Subin's avatar
Kim, Subin committed
26
27
28
29
                    <img src={option} width="30" height="30" />
                </Nav.Link>
            </Nav>
        </Navbar>
Kim, Subin's avatar
Kim, Subin committed
30
31
32
33
    )
}

export default MainNav