Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#16 fix: 로그인 UI 수정 #54

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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