From aeb0d69b60e272f34eff6a89230a9e25641c17e1 Mon Sep 17 00:00:00 2001 From: HoyeongJeon <78394999+HoyeongJeon@users.noreply.github.com> Date: Thu, 28 Nov 2024 00:00:07 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=98=A4=ED=83=80=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=20=EB=B0=8F=20=ED=99=9C=EB=8F=99=EC=B6=94=EC=B2=9C=20=EC=8B=9C?= =?UTF-8?q?=EA=B0=84=20=EC=9E=85=EB=A0=A5=EC=8B=9C=20=EA=B2=BD=EA=B3=A0?= =?UTF-8?q?=EB=AC=B8=EA=B5=AC=20=EC=A1=B0=EA=B1=B4=EB=B6=80=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=B4=EC=97=AC=EC=A3=BC=EB=8F=84=EB=A1=9D=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20(#38)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ChoiceSuggestions.tsx | 2 +- .../sg-activity/components/ChoiceTime.tsx | 21 ++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/app/home/sg-activity/components/ChoiceSuggestions.tsx b/src/app/home/sg-activity/components/ChoiceSuggestions.tsx index 31d7e76..a8c8024 100644 --- a/src/app/home/sg-activity/components/ChoiceSuggestions.tsx +++ b/src/app/home/sg-activity/components/ChoiceSuggestions.tsx @@ -125,7 +125,7 @@ export default function ChoiceSuggestion({
딱 맞는 활동을 가져왔어요!

- 아 중 원하는 활동을 하나 선택해 보세요. + 이 중 원하는 활동을 하나 선택해 보세요.

diff --git a/src/app/home/sg-activity/components/ChoiceTime.tsx b/src/app/home/sg-activity/components/ChoiceTime.tsx index 27a38e8..6bde726 100644 --- a/src/app/home/sg-activity/components/ChoiceTime.tsx +++ b/src/app/home/sg-activity/components/ChoiceTime.tsx @@ -10,6 +10,8 @@ export default function ChoiceTime({ setError }: SetErrorProps) { '시간은 최소 10분부터 최대 300분까지 입력할 수 있어요.', ) + const [isValid, setIsValid] = useState(false) + const { spareTime, setSpareTime } = useActivityStore() const validateTime = (inputTime: string) => { @@ -40,6 +42,7 @@ export default function ChoiceTime({ setError }: SetErrorProps) { const handleChangeTime = (inputTime: string) => { setSpareTime(inputTime) const validate = validateTime(inputTime) + setIsValid(validate) setError(!validate) // 모든 조건을 만족하면 다음 버튼을 활성화 } @@ -71,16 +74,14 @@ export default function ChoiceTime({ setError }: SetErrorProps) {

의 시간이 남아요.

-

- {state !== '시간은 최소 10분부터 최대 300분까지 입력할 수 있어요.' && ( - - )} - {state} -

+ {(spareTime === '' || !isValid) && ( +

+ {spareTime !== '' && !isValid && } + {state} +

+ )} ) }