Skip to content

Commit

Permalink
Merge pull request #83 from Gosrock/dev
Browse files Browse the repository at this point in the history
[FEATURE] 데모 버전 update
  • Loading branch information
9yujin authored Sep 11, 2022
2 parents 613b257 + 0c31532 commit 67345d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hooks/useInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const useInput = <T,>(initialValue: T) => {
},
};

return [value, bind, reset] as const;
return [value, bind, reset, setValue] as const;
};

export default useInput;
4 changes: 3 additions & 1 deletion src/pages/auth/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ const Login = () => {
const navigate = useNavigate();
const { step } = useParams();
const [valueSend, bindSend, resetSend] = useInput<string>('');
const [valueValidate, bindValidate, resetValidate] = useInput<string>('');
const [valueValidate, bindValidate, resetValidate, setValueValidate] =
useInput<string>('');
const [auth, setAuth] = useRecoilState(authState);
const redirectUri = useRecoilValue(redirectState);
const { openModal, closeModal } = useModal();
Expand All @@ -44,6 +45,7 @@ const Login = () => {
phoneNumber: data.data.phoneNumber,
});
resetSend();
setValueValidate(data.data.validationNumber);
},
onError: () => navigate('/auth/login/1'),
},
Expand Down

0 comments on commit 67345d6

Please sign in to comment.