ChannelSingle.js 1.27 KB
Newer Older
Kim, Chaerin's avatar
Kim, Chaerin committed
1
import { Link, Route, Switch, useParams } from "react-router-dom";
우지원's avatar
우지원 committed
2

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

Kim, Chaerin's avatar
Kim, Chaerin committed
28
29
30
31
32
33
34
35
36
37
38
39
            {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
40
41
      </div>
    </div>
Kim, Chaerin's avatar
Kim, Chaerin committed
42
43
  );
};
Kim, Chaerin's avatar
Kim, Chaerin committed
44

Kim, Chaerin's avatar
Kim, Chaerin committed
45
export default ChannelSingle;