ChannelSingle.js 1.15 KB
Newer Older
이재연's avatar
aaa    
이재연 committed
1
2
import { Link, Route, Switch, useParams } from "react-router-dom";

3
const ChannelSingle = (props) => {
이재연's avatar
aaa    
이재연 committed
4
  const { roomId } = useParams();
5
  console.log('props', props.channel)
seoyeon's avatar
seoyeon committed
6
  return (
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
    <div>
      <div
        className="overflow-auto"
        style={{ height: "610px" }}
      >
        {props.channel.map((el) => (
          <div className="mb-3">
            <div className="m-3 p-1 row" style={{ backgroundColor: "#E0CEE8" }}>
              <Link to={`${roomId}/${el.channelName}`}>
                <img
                  className="col-auto mt-2"
                  src="/fullSpeaker.png"
                  width="25px"
                  height="25px"
                />
                <h5 className="col mt-2" style={{ color: "black" }}>
                  {el.channelName}
                </h5>
              </Link>
            </div>
우지원's avatar
우지원 committed
27

28
29
30
31
32
33
34
            {el.joinName && el.joinName.map((e) =>
              <div><ul className="mx-5" style={{ color: "#76D079" }}>
                <li>
                  <p style={{ color: "black" }}>{e}</p>
                </li>
              </ul></div>)}
          </div>))}
seoyeon's avatar
seoyeon committed
35
36
        </div>
    </div>
이재연's avatar
aaa    
이재연 committed
37
38
  );
};
Kim, Chaerin's avatar
Kim, Chaerin committed
39

이재연's avatar
aaa    
이재연 committed
40
export default ChannelSingle;