Header.js 2.56 KB
Newer Older
seoyeon's avatar
0705    
seoyeon committed
1
import { Link } from 'react-router-dom'
Kim, Chaerin's avatar
merge19    
Kim, Chaerin committed
2
3
import { handleLogout } from '../context/auth'

Kim, Chaerin's avatar
Kim, Chaerin committed
4
5
6
const Header = () => {
  return (
    <div>
7
      <form
seoyeon's avatar
0705    
seoyeon committed
8
        style={{ backgroundColor: '#FCF4FF' }}
9
10
        className="flex-column align-items-center justify-content-center p-2"
      >
Kim, Chaerin's avatar
merge19    
Kim, Chaerin committed
11
12
13
        <div className="d-flex justify-content-end">
          <div>
            <Link to="/user">
Kim, Chaerin's avatar
Kim, Chaerin committed
14
              <img src="/BORA.png" alt="logo" style={{ width: '160px' }} />
Kim, Chaerin's avatar
merge19    
Kim, Chaerin committed
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
            </Link>
          </div>
          <button
            type="button"
            className=" mt-3 ms-5 rounded"
            data-bs-toggle="modal"
            data-bs-target="#logout"
            style={{
              height: '30px',
              backgroundColor: '#E0CEE8',
              color: 'black',
              border: '1px #E0CEE8',
            }}
          >
            로그아웃
          </button>
          <div
            className="modal fade"
            id="logout"
            tabIndex="-1"
            aria-labelledby="logoutLabel"
            aria-hidden="true"
          >
            <div className="modal-dialog">
              <div className="modal-content">
                <div className="modal-header">
                  <button
                    type="button"
                    className="btn-close"
                    data-bs-dismiss="modal"
                    aria-label="Close"
                  ></button>
                </div>
                <div className="modal-body d-flex justify-content-center">
                  로그아웃 하시겠습니까?
                </div>
                <div className="row mb-3">
                  <div className="d-flex justify-content-evenly">
                    <Link to="/" className="col-2 p-1 btn btn-primary">
                    <button
                      type="submit"
                      className="btn btn-primary"
                      onClick={() => handleLogout()}
                      data-bs-dismiss="modal"
                    >
                      
                    </button>
                    </Link>
                    <button
                      type="submit"
                      className="col-2 p-1 btn btn-primary"
                      data-bs-dismiss="modal"
                    >
                      아니요
                    </button>
                  </div>
                </div>
              </div>
            </div>
          </div>
75
76
77
        </div>
      </form>
      <div
seoyeon's avatar
0705    
seoyeon committed
78
        style={{ backgroundColor: '#262626', width: 'auto', height: '2px' }}
79
      ></div>
Kim, Chaerin's avatar
Kim, Chaerin committed
80
    </div>
seoyeon's avatar
0705    
seoyeon committed
81
82
  )
}
Kim, Chaerin's avatar
Kim, Chaerin committed
83

seoyeon's avatar
0705    
seoyeon committed
84
export default Header