From 89a350082099d32999d019b5cf7ae08711cf40a3 Mon Sep 17 00:00:00 2001 From: yoonc01 Date: Sun, 25 Aug 2024 13:11:35 +0900 Subject: [PATCH] =?UTF-8?q?console.log,=20isRequired=20=EA=B0=99=EC=9D=80?= =?UTF-8?q?=20=EC=9E=90=EC=9E=98=EC=9E=90=EC=9E=98=ED=95=9C=20=EA=B2=83=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/service-cicd.yml | 2 +- admin/src/pages/miniQuiz/MiniQuizContent.jsx | 1 - admin/src/pages/reward/Reward.jsx | 1 - service/src/pages/eventIntro/EventIntroRewards.jsx | 1 - service/src/pages/miniquiz/LoadingQuiz.jsx | 6 +----- service/src/pages/miniquiz/MiniQuizMain.jsx | 2 +- service/src/pages/miniquiz/SubmitButton.jsx | 2 +- service/src/pages/miniquiz/miniquizhooks/useMiniQuiz.js | 7 +++---- 8 files changed, 7 insertions(+), 15 deletions(-) diff --git a/.github/workflows/service-cicd.yml b/.github/workflows/service-cicd.yml index 400e8dc..5c382e6 100644 --- a/.github/workflows/service-cicd.yml +++ b/.github/workflows/service-cicd.yml @@ -1,4 +1,4 @@ -name: admin Deploy to S3 and CloudFront +name: service Deploy to S3 and CloudFront on: push: diff --git a/admin/src/pages/miniQuiz/MiniQuizContent.jsx b/admin/src/pages/miniQuiz/MiniQuizContent.jsx index 9ba55cb..9132363 100644 --- a/admin/src/pages/miniQuiz/MiniQuizContent.jsx +++ b/admin/src/pages/miniQuiz/MiniQuizContent.jsx @@ -3,7 +3,6 @@ import PropTypes from 'prop-types'; import InputForm from '@/components/form/InputForm'; function MiniQuizContent({ response, onChange }) { - // console.log(response); return ( <> { - console.log(rewardData); const formData = createFormData(rewardData); try { const response = await putAdminReward(formData); diff --git a/service/src/pages/eventIntro/EventIntroRewards.jsx b/service/src/pages/eventIntro/EventIntroRewards.jsx index a7a12f5..1367f61 100644 --- a/service/src/pages/eventIntro/EventIntroRewards.jsx +++ b/service/src/pages/eventIntro/EventIntroRewards.jsx @@ -8,7 +8,6 @@ function EventIntroRewards() { const fetchInfo = async () => { try { const data = await getPrizeInfo(); - console.log(data); if (Array.isArray(data)) { setInfo(data); } else { diff --git a/service/src/pages/miniquiz/LoadingQuiz.jsx b/service/src/pages/miniquiz/LoadingQuiz.jsx index febabd5..94a779b 100644 --- a/service/src/pages/miniquiz/LoadingQuiz.jsx +++ b/service/src/pages/miniquiz/LoadingQuiz.jsx @@ -33,11 +33,7 @@ function LoadingQuiz() { '퀴즈 정보를 가져오는 중..!', ]; - const loadingText = useLoadingText( - '퀴즈 정보를 가져오는 중..!', - loadingTexts, - 500, - ); + const loadingText = useLoadingText(loadingTexts[3], loadingTexts, 500); return (
diff --git a/service/src/pages/miniquiz/MiniQuizMain.jsx b/service/src/pages/miniquiz/MiniQuizMain.jsx index 22d58c8..ec4c3c0 100644 --- a/service/src/pages/miniquiz/MiniQuizMain.jsx +++ b/service/src/pages/miniquiz/MiniQuizMain.jsx @@ -11,7 +11,7 @@ const QuizDescription = ({ description }) => ( ); QuizDescription.propTypes = { - description: PropTypes.string.isRequired, + description: PropTypes.string, }; const QuizQuestions = ({ questions, selectedId, onSelect }) => ( diff --git a/service/src/pages/miniquiz/SubmitButton.jsx b/service/src/pages/miniquiz/SubmitButton.jsx index dba393b..7144bca 100644 --- a/service/src/pages/miniquiz/SubmitButton.jsx +++ b/service/src/pages/miniquiz/SubmitButton.jsx @@ -51,7 +51,7 @@ function SubmitButton({ quizId, isChosen, disabled, setDisabled }) { } SubmitButton.propTypes = { - quizId: PropTypes.number.isRequired, + quizId: PropTypes.number, isChosen: PropTypes.number.isRequired, disabled: PropTypes.bool.isRequired, setDisabled: PropTypes.func.isRequired, diff --git a/service/src/pages/miniquiz/miniquizhooks/useMiniQuiz.js b/service/src/pages/miniquiz/miniquizhooks/useMiniQuiz.js index 37aa08f..67a45f4 100644 --- a/service/src/pages/miniquiz/miniquizhooks/useMiniQuiz.js +++ b/service/src/pages/miniquiz/miniquizhooks/useMiniQuiz.js @@ -18,10 +18,9 @@ const useMiniQuiz = () => { getMiniQuiz(), new Promise(resolve => setTimeout(resolve, 300)), // 사용자의 경험을 방해하지 않는 선에서 로딩 화면을 보여주기 위한 0.3초 ]); - - const { quizCode, quizQuestions } = quizData; - if (quizCode === 'NO_QUIZ_CONTENT') { - setCode(quizCode); + const { code, quizQuestions } = quizData; + if (code === 'NO_QUIZ_CONTENT') { + setCode(code); return; } setData(quizData);