From 23199255efbbbbc98e2bb1d064ecf6c26c2e4c4b Mon Sep 17 00:00:00 2001 From: CJewon <112820744+CJewon@users.noreply.github.com> Date: Sat, 15 Feb 2025 23:02:46 +0900 Subject: [PATCH 1/2] =?UTF-8?q?:truck:=20truck=20:=20=ED=9A=8C=EC=9B=90?= =?UTF-8?q?=EA=B0=80=EC=9E=85=20=EC=84=B1=EA=B3=B5=20=EC=8B=9C=20=EB=9D=BC?= =?UTF-8?q?=EC=9A=B0=ED=8C=85=20=EC=A3=BC=EC=86=8C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/signup/_components/SignupForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/signup/_components/SignupForm.tsx b/src/app/signup/_components/SignupForm.tsx index 8a6dda5..3058eac 100644 --- a/src/app/signup/_components/SignupForm.tsx +++ b/src/app/signup/_components/SignupForm.tsx @@ -37,7 +37,7 @@ export default function SignupForm() { useEffect(() => { if (isLoggedIn) { - router.replace('/'); + router.replace('/wines'); } }, [isLoggedIn, router]); From 4b05ab0ef50ba12444c9fe5f4963162aeffacd0d Mon Sep 17 00:00:00 2001 From: CJewon <112820744+CJewon@users.noreply.github.com> Date: Sat, 15 Feb 2025 23:32:20 +0900 Subject: [PATCH 2/2] =?UTF-8?q?:recycle:=20recycle=20:=20=EB=8B=89?= =?UTF-8?q?=EB=84=A4=EC=9E=84=20=EC=A4=91=EB=B3=B5=20=EC=8B=9C=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=EB=A9=94=EC=84=B8=EC=A7=80=20=ED=91=9C=EC=B6=9C?= =?UTF-8?q?=ED=95=98=EB=8A=94=20=EA=B8=B0=EB=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 1 - src/app/signin/api/KakaoApi.tsx | 1 - src/app/signup/_components/SignupForm.tsx | 16 ++++++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 252d12d..3450946 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5845,7 +5845,6 @@ "version": "11.0.3", "resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-11.0.3.tgz", "integrity": "sha512-cbPtHJPfc0sGqVwozBwaTrTu1ogB9+BLLjd4dDXd863qYLj7DGrQ2sg5RAChjFUB4yc3w8iXOtWcJqPK/6xqRQ==", - "license": "MIT", "dependencies": { "clsx": "^2.1.1" }, diff --git a/src/app/signin/api/KakaoApi.tsx b/src/app/signin/api/KakaoApi.tsx index 9c78070..f89c2e9 100644 --- a/src/app/signin/api/KakaoApi.tsx +++ b/src/app/signin/api/KakaoApi.tsx @@ -17,7 +17,6 @@ export default async function KakaoApi() { } const data = await response.json(); - console.log('카카오 앱 등록 성공 :', data); return data; } catch (error) { console.error('카카오 앱 등록 오류 :', error); diff --git a/src/app/signup/_components/SignupForm.tsx b/src/app/signup/_components/SignupForm.tsx index 3058eac..5395123 100644 --- a/src/app/signup/_components/SignupForm.tsx +++ b/src/app/signup/_components/SignupForm.tsx @@ -61,13 +61,17 @@ export default function SignupForm() { if (!response.ok) { const errorData = await response.json(); - console.log(errorData); - if (errorData.details?.email?.message) { - setError('email', { type: 'server', message: errorData.details.email.message }); - } - if (errorData.details?.nickname?.message) { - setError('nickname', { type: 'server', message: errorData.details.nickname.message }); + if (response.status === 500) { + setError('nickname', { type: 'server', message: '이미 사용중인 닉네임입니다.' }); + } else { + if (errorData.details?.email?.message) { + setError('email', { type: 'server', message: errorData.details.email.message }); + } + + if (errorData.details?.nickname?.message) { + setError('nickname', { type: 'server', message: '이미 사용중인 닉네임입니다.' }); + } } return;