Menu.js 799 Bytes
Newer Older
Choi Ga Young's avatar
Choi Ga Young committed
1
2
import React from 'react'
import { Navbar, Nav, Button } from 'react-bootstrap';
우지원's avatar
우지원 committed
3
import { Link } from 'react-router-dom';
4
import { handleLogout } from '../utils/auth';
Choi Ga Young's avatar
Choi Ga Young committed
5
6
7
8
9
10
11
12
13
14
15
16
17

function Menu() {
  const userName = "정연우";

  return (
    <Navbar bg="dark" variant="dark">
      <Navbar.Brand href="/home">YDK Messenger</Navbar.Brand>
      <div className='ml-1 mr-2' style={{ color: 'white' }}>{userName}  환영합니다</div>
      <Nav className="mr-auto">
        <Nav.Link href="/home">Home</Nav.Link>
        <Nav.Link href="/profile">Profile</Nav.Link>
        <Nav.Link href="/hello">Hello</Nav.Link>
      </Nav>
우지원's avatar
우지원 committed
18
19
20
      <Link to="./login">
        <Button onClick={() => handleLogout()} variant="light" className="ml-3">Logout</Button>
      </Link>
Choi Ga Young's avatar
Choi Ga Young committed
21
22
23
24
25
    </Navbar>
  )
}

export default Menu