From 599c828205ceba5f0129460e9caacd40cd0f5240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=9B=90=EC=A3=BC?= Date: Tue, 14 May 2024 16:52:59 +0900 Subject: [PATCH 1/3] =?UTF-8?q?Fix=20#75:=20=EB=B0=A9=20=EC=83=9D=EC=84=B1?= =?UTF-8?q?=20=ED=9B=84=20=EC=9E=85=EC=9E=A5=EC=8B=9C=20=EB=B0=A9=20?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=EC=95=88=EB=B0=9B=EC=95=84=EC=99=80?= =?UTF-8?q?=EC=A7=80=EB=8A=94=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/app/hooks/useSetupSocket.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/app/hooks/useSetupSocket.ts b/frontend/app/hooks/useSetupSocket.ts index ffba136..4d38b78 100644 --- a/frontend/app/hooks/useSetupSocket.ts +++ b/frontend/app/hooks/useSetupSocket.ts @@ -108,8 +108,8 @@ const useSetUpRoom = (socket: WebSocket | null) => { successGetRoomList(responseData.data.roomList) break case SOCKET_RES_CODE.CREATE_ROOM: - console.log('방 생성 성공 응답') - successCreateRoom(responseData.data.roomId) + console.log('방 생성 성공 응답', responseData.data) + successCreateRoom(responseData.data) break case SOCKET_RES_CODE.ENTER_ROOM_OWNER: console.log('방 입장 성공 응답') From b856a35231cfc246773c3368c4690640e095dd2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=9B=90=EC=A3=BC?= Date: Tue, 14 May 2024 23:53:12 +0900 Subject: [PATCH 2/3] =?UTF-8?q?Feat=20#75:=20=EA=B2=8C=EC=9E=84=20?= =?UTF-8?q?=EC=B0=B8=EC=97=AC=20=EB=B0=A9=EB=B2=95=20=EC=95=88=EB=82=B4=20?= =?UTF-8?q?=EB=AC=B8=EA=B5=AC=20=EC=9D=B8=ED=84=B0=EB=B2=8C=EB=A1=9C=20?= =?UTF-8?q?=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../boardContent/IntroductionContent.tsx | 88 +++++++++++++++---- 1 file changed, 71 insertions(+), 17 deletions(-) diff --git a/frontend/app/(page)/(needProtection)/game/component/boardContent/IntroductionContent.tsx b/frontend/app/(page)/(needProtection)/game/component/boardContent/IntroductionContent.tsx index 8c27e37..af17499 100644 --- a/frontend/app/(page)/(needProtection)/game/component/boardContent/IntroductionContent.tsx +++ b/frontend/app/(page)/(needProtection)/game/component/boardContent/IntroductionContent.tsx @@ -1,26 +1,80 @@ +import { PiPersonArmsSpreadFill } from 'react-icons/pi' import RoomInfo from './RoomInfo' +import { useEffect, useState } from 'react' + +const TeamSelectContent = () => { + return ( +
+ {/* TODO: 문구 의논해서 정하기 */} +

팀을 선택하세요

+
+

+ RED 혹은 + BLUE 필드로 이동해 팀을 선택하세요 +

+

+ 우측 하단의 + + 버튼을 눌러 캐릭터를 변경해 보세요 +

+
+
+ ) +} + +const GameRuleContent = () => { + return ( +
+

매 라운드 퀴즈가 출제됩니다

+
+

+ {['A', 'B', 'C', 'D'].map((answer, index) => ( + <> + + {answer} + + , + + ))} + 중 정답이라고 생각되는 구역으로 이동해서 정답을 선택하세요 +

+

+ 정답을 가장 먼저 맞춘 3인에게 점수가 부여됩니다 + {/* eslint-disable-next-line @next/next/no-img-element */} + Clapping Hands Light Skin Tone +

+
+
+ ) +} const IntroductionContent = () => { + // TeamSelectContent, GameRuleContent가 각각 번갈아가면서 보여짐 + const [currentContent, setCurrentContent] = useState(0) + const contents = [TeamSelectContent, GameRuleContent] + + useEffect(() => { + const interval = setInterval(() => { + setCurrentContent((prev) => (prev + 1) % contents.length) + }, 5000) + return () => clearInterval(interval) + }, []) + return (
-
- {/* TODO: 문구 의논해서 정하기 */} -

원하는 팀을 고르세요

-
-

- RED 혹은 - BLUE 필드로 이동해 팀을 선택하세요 -

-

- 우측 하단의 - - 캐릭터 변경 - - 버튼을 눌러 캐릭터를 변경해 보세요 -

-
-
+ {contents[currentContent]()} + {/* {GameRuleContent()} */}
) } From bd7c5588a536f5956d936c4087639ec4028f9783 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=9B=90=EC=A3=BC?= Date: Tue, 14 May 2024 23:54:39 +0900 Subject: [PATCH 3/3] =?UTF-8?q?Style=20#75:=20useEffect=20=EC=9D=98?= =?UTF-8?q?=EC=A1=B4=EC=84=B1=20=EB=B0=B0=EC=97=B4=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?=EB=B0=8F=20=EC=A3=BC=EC=84=9D=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../game/component/boardContent/IntroductionContent.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/app/(page)/(needProtection)/game/component/boardContent/IntroductionContent.tsx b/frontend/app/(page)/(needProtection)/game/component/boardContent/IntroductionContent.tsx index af17499..3f7dbf6 100644 --- a/frontend/app/(page)/(needProtection)/game/component/boardContent/IntroductionContent.tsx +++ b/frontend/app/(page)/(needProtection)/game/component/boardContent/IntroductionContent.tsx @@ -68,13 +68,12 @@ const IntroductionContent = () => { setCurrentContent((prev) => (prev + 1) % contents.length) }, 5000) return () => clearInterval(interval) - }, []) + }, [contents.length]) return (
{contents[currentContent]()} - {/* {GameRuleContent()} */}
) }