File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ import { useState } from 'react';
1616
1717type LoginFormProps = {
1818 handleOpenModal : ( ) => void ;
19- handleSubmit : ( ) => void ;
2019} ;
2120
2221const 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 >
You can’t perform that action at this time.
0 commit comments