Skip to content

Commit ded9eff

Browse files
committed
자기 자신에게 보내는거 프론트상에서도 제한
1 parent e4fb3ad commit ded9eff

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

src/modules/Bingo/BingoPresenter.tsx

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ import { Dispatch, SetStateAction } from "react";
22
import { toast, ToastContainer } from "react-toastify";
33
import "react-toastify/dist/ReactToastify.css";
44

5-
import { Container, Input, Button, FormControl } from "@mui/material";
5+
import {
6+
Container,
7+
Input,
8+
Button,
9+
FormControl,
10+
Typography,
11+
} from "@mui/material";
612
import { styled } from "@mui/system";
713
import LongTextBox from "./components/LongTextBox.tsx";
814
import SqaureTextBox from "./components/SqaureTextBox.tsx";
@@ -171,6 +177,11 @@ const BingoPresenter = (props: BingoPresenterProps) => {
171177
) : (
172178
<Wrapper>
173179
<MyInfo>My Id: {props.myID}</MyInfo>
180+
<Typography>자기가 하고 있는 일 소개</Typography>
181+
<Typography>올해 이룬 것과 내년 목표 이야기하기</Typography>
182+
<Typography>최근 관심사(일, 취미 등)</Typography>
183+
<Typography>좋아하는 음식</Typography>
184+
<Typography>최근에 듣는 노동요</Typography>
174185
{/* {props.userSelectedWords.map((word) => (
175186
<LongTextBox key={word} text={word} />
176187
))} */}
@@ -204,13 +215,18 @@ const BingoPresenter = (props: BingoPresenterProps) => {
204215
></InputBox>
205216
<Button
206217
onClick={async () => {
218+
if (props.opponentID == props.myID) {
219+
toast.error("내가 나에게 보낼 수 없습니다.");
220+
return;
221+
}
222+
207223
const res = await props.onClickSendWords(props.opponentID);
208224
if (res) {
209225
toast.success("상호작용에 성공했습니다.");
210226
}
211227
}}
212228
>
213-
단어 보내기
229+
ID 보내기
214230
</Button>
215231
<ToastContainer
216232
position="top-right" // 알람 위치 지정

0 commit comments

Comments
 (0)