Header.js 2.54 KB
Newer Older
seoyeon's avatar
0705    
seoyeon committed
1
import { Link } from 'react-router-dom'
seoyeon's avatar
seoyeon 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"
      >
seoyeon's avatar
seoyeon committed
11
12
        <div className="d-flex justify-content-end">
          <div>
seoyeon's avatar
seoyeon committed
13
14
15
            <Link to="/user">
              <img src="/BORA.png" style={{ width: '160px' }} />
            </Link>
seoyeon's avatar
seoyeon committed
16
17
18
19
20
21
22
          </div>
          <button
            type="button"
            className=" mt-3 ms-5 rounded"
            data-bs-toggle="modal"
            data-bs-target="#logout"
            style={{
seoyeon's avatar
seoyeon committed
23
              height: '30px',
seoyeon's avatar
seoyeon committed
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
              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">
seoyeon's avatar
seoyeon committed
53
54
55
56
57
58
59
                    <Link to="/" className="col-2 p-1 btn btn-primary">
                    <button
                      type="submit"
                      className="btn btn-primary"
                      onClick={() => handleLogout()}
                      data-bs-dismiss="modal"
                    >
seoyeon's avatar
seoyeon committed
60
61
                      
                    </button>
seoyeon's avatar
seoyeon committed
62
                    </Link>
seoyeon's avatar
seoyeon committed
63
64
65
66
67
68
69
70
71
72
73
74
                    <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