Skip to content

Commit 30f6e99

Browse files
committed
fix: 태그 속성 누락 수정 및 페이지 이동 기능 구현
1 parent 8185d9e commit 30f6e99

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

components/auth/LoginForm.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { useState } from 'react';
1616

1717
type LoginFormProps = {
1818
handleOpenModal: () => void;
19-
handleSubmit: () => void;
2019
};
2120

2221
const LoginForm = ({ handleOpenModal }: LoginFormProps) => {
@@ -27,6 +26,7 @@ const LoginForm = ({ handleOpenModal }: LoginFormProps) => {
2726
const router = useRouter();
2827

2928
const githubProvider = new GithubAuthProvider();
29+
3030
const handleGithubLogin = async () => {
3131
try {
3232
const result: UserCredential = await signInWithPopup(
@@ -61,6 +61,7 @@ const LoginForm = ({ handleOpenModal }: LoginFormProps) => {
6161
password
6262
);
6363
console.log('로그인 성공!', userCredential.user);
64+
router.push('/main');
6465
} catch (err) {
6566
console.error('로그인 에러:', err);
6667
setError('이메일 또는 비밀번호가 잘못되었습니다.');
@@ -116,7 +117,7 @@ const LoginForm = ({ handleOpenModal }: LoginFormProps) => {
116117
<div className="bg-border h-px flex-1" />
117118
</div>
118119

119-
<Button variant="github" onClick={handleGithubLogin}>
120+
<Button variant="github" onClick={handleGithubLogin} type="button">
120121
<FaGithub className="text-xl" />
121122
<span>Github로 로그인</span>
122123
</Button>

0 commit comments

Comments
 (0)