Skip to content

Commit

Permalink
fix: 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
abcxj123 committed Jun 11, 2024
1 parent 3dea7f2 commit 3a25c37
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/components/molecules/PasswordForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export const PasswordForm: FC<IProps> = ({
key={index}
placeholder='●'
type='password'
pattern='\d*'
maxLength={1}
className='text-4xl w-12 text-center mx-1 caret-transparent'
ref={(el) => (inputRef.current[index] = el)}
Expand Down
11 changes: 10 additions & 1 deletion src/pages/auth/Join.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ export const Join = () => {
const res = ApiClient.getInstance().postJoin(input);
return res;
},
onError: (e) => {
console.log(e);
alert('이미 가입된 번호입니다.');
setCookie('phoneNumber', inputs.phoneNumber);
navigate('/login');
},
onSuccess: (data) => {
setCookie('phoneNumber', data.phoneNumber);
setIsActive(true);
Expand Down Expand Up @@ -160,7 +166,10 @@ export const Join = () => {
setIsActive(false);
}
if (step === 2 && isBirth) {
setInputs({ ...inputs, birthDate: birthRef.current!.value });
setInputs({
...inputs,
birthDate: birthRef.current!.value,
});
setStep((prev) => prev + 1);
setIsActive(false);
}
Expand Down
2 changes: 0 additions & 2 deletions src/pages/moneyBox/MoneyBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ export const MoneyBox = () => {
prev: boolean;
};

console.log(locationState);

const { data: moneyBoxData, isSuccess: querySuccess } = useQuery({
queryKey: ['moneyBox'],
queryFn: () => {
Expand Down

0 comments on commit 3a25c37

Please sign in to comment.