ChannelList.js 3.81 KB
Newer Older
seoyeon's avatar
seoyeon committed
1
2
3
import ChannelSingle from './ChannelSingle'
import { Link } from 'react-router-dom'
import backward from '../../backward.png'
이재연's avatar
a    
이재연 committed
4
import { useState } from 'react'
Kim, Chaerin's avatar
Kim, Chaerin committed
5
6

const ChannelList = () => {
이재연's avatar
a    
이재연 committed
7
8
9
10
11
12
13

  function copyLink(){
    const copyLink=document.getElementById('copycode')
    document.execCommand('copy');
    console.log('너죽을래')

  }
Kim, Chaerin's avatar
Kim, Chaerin committed
14
15
  return (
    <div>
우지원's avatar
우지원 committed
16
17
      <nav className="navbar navbar-light d-flex justify-content-between">
        <div>
우지원's avatar
우지원 committed
18
19
20
          <Link to="/user">
            <button
              type="button"
seoyeon's avatar
seoyeon committed
21
              className="btn"
우지원's avatar
우지원 committed
22
            >
seoyeon's avatar
seoyeon committed
23
              <img src={backward} width="25" height="25" />
우지원's avatar
우지원 committed
24
25
26
27
            </button>
          </Link>
        </div>

우지원's avatar
우지원 committed
28
        <div>
우지원's avatar
우지원 committed
29
          <Link to="/user">
seoyeon's avatar
seoyeon committed
30
            <img src="/BORA.png" style={{ width: '160px' }} />
우지원's avatar
우지원 committed
31
32
33
          </Link>
        </div>

우지원's avatar
우지원 committed
34
        <div>
우지원's avatar
우지원 committed
35
36
37
38
39
40
41
42
          <button
            className="navbar-toggler"
            type="button"
            data-bs-toggle="offcanvas"
            data-bs-target="#hamburger"
            aria-controls="hamburger"
            aria-expanded="false"
            aria-label="Toggle navigation"
seoyeon's avatar
seoyeon committed
43
            style={{ border: '#f4c1f2' }}
우지원's avatar
우지원 committed
44
45
46
47
48
49
          >
            <span className="navbar-toggler-icon"></span>
          </button>
        </div>
      </nav>

seoyeon's avatar
seoyeon committed
50
51
      <div
        className="offcanvas offcanvas-start"
우지원's avatar
우지원 committed
52
53
        style={{ width: "330px" }}
        tabIndex="-1"
seoyeon's avatar
seoyeon committed
54
55
56
        id="hamburger"
        aria-labelledby="hamburgerLabel"
      >
우지원's avatar
우지원 committed
57
        <div className="offcanvas-header">
우지원's avatar
우지원 committed
58
          <h5 className="col-6 offcanvas-title" id="offcanvasExampleLabel">
seoyeon's avatar
seoyeon committed
59
60
            음성 채널 목록
          </h5>
이재연's avatar
a    
이재연 committed
61
          <button className="mt-2" id='copycode' onClick={copyLink()}> #ASV2AE985 </button>
seoyeon's avatar
seoyeon committed
62
63
64
65
66
67
          <button
            type="button"
            className="btn-close text-reset"
            data-bs-dismiss="offcanvas"
            aria-label="Close"
          ></button>
우지원's avatar
우지원 committed
68
69
        </div>

우지원's avatar
우지원 committed
70
        <ChannelSingle />
우지원's avatar
우지원 committed
71
72
73
74
75
76
77
78

        <div className="d-flex flex-row-reverse">
          <button
            type="button"
            className="m-3 rounded text-white"
            data-bs-toggle="modal"
            data-bs-target="#exitRoom"
            style={{
seoyeon's avatar
seoyeon committed
79
80
              height: '30px',
              fontWeight: 'bold',
우지원's avatar
우지원 committed
81
              backgroundColor: '#D64D61',
seoyeon's avatar
seoyeon committed
82
              color: 'black',
우지원's avatar
우지원 committed
83
              border: '1px #D64D61',
우지원's avatar
우지원 committed
84
85
86
87
            }}
          >
            퇴장
          </button>
seoyeon's avatar
seoyeon committed
88
89
90
91
92
93
94
          <div
            className="modal fade"
            id="exitRoom"
            tabindex="-1"
            aria-labelledby="exitRoomLabel"
            aria-hidden="true"
          >
우지원's avatar
우지원 committed
95
96
97
            <div className="modal-dialog">
              <div className="modal-content">
                <div className="modal-header">
seoyeon's avatar
seoyeon committed
98
99
100
101
102
103
                  <button
                    type="button"
                    className="btn-close"
                    data-bs-dismiss="modal"
                    aria-label="Close"
                  ></button>
우지원's avatar
우지원 committed
104
105
106
107
108
109
110
                </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="/user"> */}
seoyeon's avatar
seoyeon committed
111
112
113
                    <button type="submit" className="col-2 p-1 btn btn-primary">
                      
                    </button>
우지원's avatar
우지원 committed
114
                    {/* </Link> */}
seoyeon's avatar
seoyeon committed
115
116
117
118
119
120
121
                    <button
                      type="submit"
                      className="col-2 p-1 btn btn-primary"
                      data-bs-dismiss="modal"
                    >
                      아니요
                    </button>
우지원's avatar
우지원 committed
122
123
124
125
126
127
128
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
seoyeon's avatar
seoyeon committed
129
130
131
    </div>
  )
}
우지원's avatar
우지원 committed
132

seoyeon's avatar
seoyeon committed
133
export default ChannelList