Skip to content

Commit

Permalink
Fix: 소셜로그인 시 모달 잘못 뜨는 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaeYubin committed Aug 8, 2024
1 parent f5f120f commit 7367475
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/containers/login/OAuthVerifiedFailure.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use client';

import Loading from '@/components/Loading';
import { useRouter } from 'next/navigation';
import { useEffect } from 'react';

Expand All @@ -10,7 +11,7 @@ const OAuthVerifiedFailure = () => {
router.push('/register/additionalSettings');
}, [router]);

return <div>Redirecting...</div>;
return <Loading />;
};

export default OAuthVerifiedFailure;
8 changes: 6 additions & 2 deletions src/containers/register/AdditionalSettingForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ const AdditionalSettingForm = () => {
const [verifiedPhone, setVerifiedPhone] = useState(false);
const [getUserInfo, setGetUserInfo] = useState(false);

const { isSuccess, error } = useUserLoginCheck({ isReady: getUserInfo });
const { isSuccess, error, isError } = useUserLoginCheck({
isReady: getUserInfo,
});

const formSchema = z.object({
location: z.string().min(1, { message: '지역을 선택해주세요.' }),
Expand Down Expand Up @@ -131,7 +133,9 @@ const AdditionalSettingForm = () => {
useEffect(() => {
if (isSuccess) {
setOpenLoginSuccess(true);
} else {
}

if (isError) {
setOpenLoginError(true);
}
}, [isSuccess, error, router]);
Expand Down

0 comments on commit 7367475

Please sign in to comment.