InvitePage.js 2.63 KB
Newer Older
Kim, Chaerin's avatar
merge19    
Kim, Chaerin committed
1
import Header from "../components/Header";
권병윤's avatar
0806    
권병윤 committed
2

Kim, Chaerin's avatar
merge19    
Kim, Chaerin committed
3
const InvitePage = () => {
이재연's avatar
이재연 committed
4
  const usercheck = sessionStorage.getItem("user");
권병윤's avatar
0806    
권병윤 committed
5
6
7
8
9
10
11
12
13
14
15
16

  function goInvitedroom() {
    let check1= null;
    let check2= null;
    if (usercheck)
      check1 = window.confirm("카카오톡으로 전달된 초대코드를 사용해 참여해 주세요")
      if(check1)
      window.location.href=`/user/${usercheck}`
    else 
      check2 = window.confirm("로그인이 필요합니다.")
      if(check2)
        window.location.href="/"
Kim, Chaerin's avatar
merge19    
Kim, Chaerin committed
17
18
  }

권병윤's avatar
0806    
권병윤 committed
19
20
21
22
23
  function invitereject() {
    if(usercheck)
    window.location.href=`/user/${usercheck}`
    else
    window.location.href="/"
Kim, Chaerin's avatar
merge19    
Kim, Chaerin committed
24
25
26
27
28
29
30
31
32
  }

  return (
    <div>
      {/*페이지 전체*/}
      <Header />
      <div className="d-flex justify-content-evenly">
        {/* 위 사진,이름 */}
        <div
권병윤's avatar
0806    
권병윤 committed
33
34
35
36
37
38
39
40
41
          // style={{
          //   width: "100%",
          //   height: "140px",
          //   textAlign: "center",
          //   border: "3px",
          //   borderStyle: "none solid solid",
          //   borderColor: "red",
          //   fontSize: "12px",
          // }}
Kim, Chaerin's avatar
merge19    
Kim, Chaerin committed
42
        >
권병윤's avatar
0806    
권병윤 committed
43
          {/* 방 부분
Kim, Chaerin's avatar
merge19    
Kim, Chaerin committed
44
45
46
          <p style={{ marginBottom: "0px", fontSize: "16px" }}>초대받은 방</p>
          <img style={{ width: "90px", height: "90px" }}></img>
          <p style={{ marginBottom: "0px", fontSize: "16px" }}>
권병윤's avatar
0806    
권병윤 committed
47
48
            방 id: ${roomid}
          </p> */}
Kim, Chaerin's avatar
merge19    
Kim, Chaerin committed
49
50
51
52
        </div>
      </div>

      <div
권병윤's avatar
0806    
권병윤 committed
53
54
55
56
57
58
59
60
        // style={{
        //   width: "80%",
        //   height: "200px",
        //   textAlign: "center",
        //   fontSize: "18px",
        //   marginLeft: "10%",
        //   marginRight: "10%",
        // }}
Kim, Chaerin's avatar
merge19    
Kim, Chaerin committed
61
62
      >
        {/* 아래 텍스트 */}
권병윤's avatar
0806    
권병윤 committed
63
64
65
66
67
68
69
70
71
72
73
        <p align= "center" style={{
          fontSize: "30px",
          marginTop: "120px",
          marginBottom: "80px"
        }}>
          축하합니다! 친구가 당신을
          <br/>
          화상회의에 초대했습니다.
          <br/>
          <br/>
          <b>초대를 수락하시겠습니까?</b>
Kim, Chaerin's avatar
merge19    
Kim, Chaerin committed
74
75
76
77
78
79
80
81
82
83
        </p>
      </div>

      <div className="d-flex justify-content-evenly">
        {/* 수락, 거절 버튼 */}
        <button
          type="submit"
          className="col-2 p-1 btn btn-primary"
          data-bs-dismiss="modal"
          style={{ width: "120px" }}
권병윤's avatar
0806    
권병윤 committed
84
85
          onClick={goInvitedroom}
          
Kim, Chaerin's avatar
merge19    
Kim, Chaerin committed
86
87
88
89
90
91
92
93
        >
          수락
        </button>
        <button
          type="submit"
          className="col-2 p-1 btn btn-primary"
          data-bs-dismiss="modal"
          style={{ width: "120px" }}
권병윤's avatar
0806    
권병윤 committed
94
          onClick={invitereject}
Kim, Chaerin's avatar
merge19    
Kim, Chaerin committed
95
96
97
98
99
100
101
102
103
        >
          거절
        </button>
      </div>
    </div>
  );
};

export default InvitePage;