Commit f53b58dc authored by 이재연's avatar 이재연
Browse files

로그아웃 완료

parent ae9446cf
...@@ -23,6 +23,7 @@ function Login() { ...@@ -23,6 +23,7 @@ function Login() {
setUser({ ...user, [name]: value }) setUser({ ...user, [name]: value })
} }
async function handleSubmit(event) { async function handleSubmit(event) {
event.preventDefault() event.preventDefault()
const form = event.currentTarget; const form = event.currentTarget;
...@@ -39,20 +40,16 @@ function Login() { ...@@ -39,20 +40,16 @@ function Login() {
} catch (error) { } catch (error) {
catchErrors(error, setError) catchErrors(error, setError)
} }
} }
if (success) { if (success) {
alert('로그인 되었습니다.') alert('로그인 되었습니다.')
return <Redirect to='/' /> window.location.href='/'
} }
return ( return (
<div>
<Container className="my-5"> <Container className="my-5">
<Row className="justify-content-center"> <Row className="justify-content-center">
<Col md={5} xs={10} className="border" style={{ background: '#F7F3F3' }}> <Col md={5} xs={10} className="border" style={{ background: '#F7F3F3' }}>
...@@ -103,7 +100,6 @@ function Login() { ...@@ -103,7 +100,6 @@ function Login() {
</Col> </Col>
</Row> </Row>
</Container> </Container>
</div>
) )
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment