From db92f55b7a7ff4a832a1e23ae0ac4c03ceef856e Mon Sep 17 00:00:00 2001 From: ijun17 Date: Thu, 5 Dec 2024 22:13:01 +0900 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20=EB=B9=84=ED=9A=8C=EC=9B=90=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FE/src/features/auth/LoginModal.tsx | 39 +++++++++++++++++++---------- FE/src/pages/MainPage.tsx | 13 +++++----- 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/FE/src/features/auth/LoginModal.tsx b/FE/src/features/auth/LoginModal.tsx index 294a9ff..b86d0ab 100644 --- a/FE/src/features/auth/LoginModal.tsx +++ b/FE/src/features/auth/LoginModal.tsx @@ -29,25 +29,25 @@ export const LoginModal = ({ isOpen, onClose }: Props) => { onClick={onClose} >
e.stopPropagation()} >
-
+
{ )} +
+ + +
); }; diff --git a/FE/src/pages/MainPage.tsx b/FE/src/pages/MainPage.tsx index 3426047..ed7b0bc 100644 --- a/FE/src/pages/MainPage.tsx +++ b/FE/src/pages/MainPage.tsx @@ -25,13 +25,12 @@ export const MainPage = () => { }, []); const handleQuizCreate = () => { - // dev Mode - navigate('/quiz/setup'); - // if (isLoggedIn) navigate('/quiz/setup'); - // else { - // alert('로그인이 필요한 서비스 입니다.'); - // navigate('/login'); - // } + const token = localStorage.getItem('accessToken'); + if (token) { + navigate('/quiz/setup'); + } else { + setIsOpenLoginModal(true); + } }; const handleLogout = () => { From 7c6fb2be6f75e223b13d4110dd42de05a6874046 Mon Sep 17 00:00:00 2001 From: ijun17 Date: Thu, 5 Dec 2024 22:26:51 +0900 Subject: [PATCH 2/4] =?UTF-8?q?design:=20=EB=B2=84=ED=8A=BC=20=EC=82=AC?= =?UTF-8?q?=EC=9D=B4=20=EA=B0=84=EA=B2=A9=20=EC=A1=B0=EC=A0=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FE/src/features/game/pages/PinPage.tsx | 2 +- FE/src/features/quiz/QuizSetupPage.tsx | 21 ++++----------------- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/FE/src/features/game/pages/PinPage.tsx b/FE/src/features/game/pages/PinPage.tsx index 62f8286..8846e51 100644 --- a/FE/src/features/game/pages/PinPage.tsx +++ b/FE/src/features/game/pages/PinPage.tsx @@ -58,7 +58,7 @@ export const PinPage = () => { }} error={errors.pin} /> - +
); diff --git a/FE/src/features/quiz/QuizSetupPage.tsx b/FE/src/features/quiz/QuizSetupPage.tsx index 8a9de94..69141a6 100644 --- a/FE/src/features/quiz/QuizSetupPage.tsx +++ b/FE/src/features/quiz/QuizSetupPage.tsx @@ -6,21 +6,7 @@ import { CreateQuizSetPayload } from '@/api/rest/quizTypes'; import { Header } from '@/components/Header'; import CustomButton from '@/components/CustomButton'; import QuizsetCategory from '@/constants/quizsetCategory'; -/* -{ - title: string, // 퀴즈셋의 제목 - category: string, // 퀴즈셋 카테고리 - quizSet: { // 퀴즈들 - quiz: string, // 퀴즈 질문 - limitTime: number, // 제한 시간 (선택) - choices: { // 선택지 - content: string, // 선택지 내용 - order: number // 선택지 번호 - isAnswer: boolean - }[], - }[] -} -*/ + type Choice = { choiceContent: string; choiceOrder: number; @@ -274,13 +260,14 @@ export const QuizSetupPage: React.FC = () => { />
{/* 선택지 추가 버튼 */} -
+
선택지 addChoice(quizIndex)} size="third" color="green" + className="w-24 h-10" />
{/* 선택지 입력 */} @@ -332,7 +319,7 @@ export const QuizSetupPage: React.FC = () => { {/* 퀴즈 추가/제출 버튼 */} - +
From bc9abd48829b4cf05be59cdf5e318c90432f3e25 Mon Sep 17 00:00:00 2001 From: ijun17 Date: Thu, 5 Dec 2024 22:29:23 +0900 Subject: [PATCH 3/4] =?UTF-8?q?feat:=20=EB=A7=88=EC=9D=B4=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EB=B2=84=ED=8A=BC=20=EC=9D=BC=EB=8B=A8=20?= =?UTF-8?q?=EB=B3=B4=EC=9D=B4=EC=A7=80=20=EC=95=8A=EA=B2=8C=20=ED=95=B4?= =?UTF-8?q?=EB=86=93=EC=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FE/src/pages/MainPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FE/src/pages/MainPage.tsx b/FE/src/pages/MainPage.tsx index ed7b0bc..d906c6d 100644 --- a/FE/src/pages/MainPage.tsx +++ b/FE/src/pages/MainPage.tsx @@ -64,7 +64,7 @@ export const MainPage = () => { - + {/* */}
) : ( - ); - }; + // const ActionButton: FC = ({ label, navigatePath }) => { + // return ( + // + // ); + // }; return (