Skip to content

Commit

Permalink
Merge pull request #54 from team-Ollie/17-feature-Signup-API
Browse files Browse the repository at this point in the history
#16 fix: 로그인 UI 수정
  • Loading branch information
leejin-rho authored Jul 3, 2024
2 parents 00a29ae + 17f4309 commit cad784a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apis/hooks/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function useSignUp(userData: userProps) {
mutationKey: ["signUp"],
mutationFn: () => SignUp(userData),
onSuccess: () => {
router.push("/login");
router.push("/success");
},
onError: (error: Error) => {
window.alert("다시 회원가입해주세요.");
Expand Down
2 changes: 2 additions & 0 deletions pages/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ const Login: NextPage = () => {
ref={idInputRef}
value={userInfo.loginId}
onChange={onChange}
className="w-[19.5rem]"
/>

<AuthInput
Expand All @@ -92,6 +93,7 @@ const Login: NextPage = () => {
ref={pwInputRef}
value={userInfo.password}
onChange={onChange}
className="w-[19.5rem]"
/>
</div>
<button type="submit" className="w-[20rem]">
Expand Down
3 changes: 1 addition & 2 deletions pages/signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@ const SignUp: NextPage = () => {
password: "",
nickname: "",
identifier: "",
centerIdx: 0,
centerIdx: 1,
});

//inputRef설정 함수
const idInputRef = useRef<HTMLInputElement>(null);
const pwInputRef = useRef<HTMLInputElement>(null);
const nicknameInputRef = useRef<HTMLInputElement>(null);
const idfInputRef = useRef<HTMLInputElement>(null);
const cidInputRef = useRef<HTMLInputElement>(null);

//onChange
const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {
Expand Down

0 comments on commit cad784a

Please sign in to comment.