Commit f9a36ead authored by Lee SeoYeon's avatar Lee SeoYeon
Browse files

.

parent f00fa2c0
This diff is collapsed.
import React, { useState, useEffect } from 'react' import React, { useState, useEffect } from 'react'
import { Alert, Col, Container, Form, Row, Button, Spinner, Image } from "react-bootstrap" import { Alert, Col, Container, Form, Row, Button, Spinner, Image, Nav, Navbar } from "react-bootstrap"
import axios from "axios" import axios from "axios"
import catchErrors from '../utils/catchErrors' import catchErrors from '../utils/catchErrors'
import { Redirect } from 'react-router-dom' import { Redirect } from 'react-router-dom'
...@@ -53,8 +53,10 @@ function Login() { ...@@ -53,8 +53,10 @@ function Login() {
return ( return (
<Container> <Container>
<Row className= 'vh-100 flex-column align-items-center justify-content-center'> <Navbar bg="#fff" variant="light">
<Link to='/'><Image src={ohuh}/></Link> <Navbar.Brand href="/"><Image src={ohuh}/></Navbar.Brand>
</Navbar>
<Row className= 'mt-3 flex-column align-items-center justify-content-center'>
<h2>로그인</h2> <h2>로그인</h2>
<Col md={6}> <Col md={6}>
{error && <Alert variant='danger'> {error && <Alert variant='danger'>
...@@ -69,10 +71,13 @@ function Login() { ...@@ -69,10 +71,13 @@ function Login() {
<Form.Label>비밀번호</Form.Label> <Form.Label>비밀번호</Form.Label>
<Form.Control name='password' type='password' value={user.password} onChange={handleChange}/> <Form.Control name='password' type='password' value={user.password} onChange={handleChange}/>
</Form.Group> </Form.Group>
<Button disabled={disabled || setLoading} type='submit' <Button variant="info" disabled={disabled || setLoading} type='submit'
block> block>
{loading && <Spinner as= 'span' animation= 'border' size='sm' {loading && <Spinner as= 'span' animation= 'border' size='sm'
role= 'status' aria-hidden= 'true' />}{' '}확인</Button> role= 'status' aria-hidden= 'true' />}{' '}확인</Button>
<Link to='/signup'>
회원가입하지않으셨나요?
</Link>
</Form> </Form>
</Col> </Col>
</Row> </Row>
......
import React, { useState, useEffect } from 'react' import React, { useState, useEffect } from 'react'
import { Col, Container, Form, Row, Button, Alert, Image } from "react-bootstrap" import { Col, Container, Form, Row, Button, Alert, Image, Nav, Navbar } from "react-bootstrap"
import axios from "axios" import axios from "axios"
import catchErrors from '../utils/catchErrors' import catchErrors from '../utils/catchErrors'
import { Redirect } from 'react-router-dom' import { Redirect } from 'react-router-dom'
...@@ -49,9 +49,11 @@ function Signup() { ...@@ -49,9 +49,11 @@ function Signup() {
return ( return (
<Container> <Container>
<Row className= 'vh-100 flex-column align-items-center justify-content-center'> <Navbar bg="#fff" variant="light">
<Link to='/'><Image src={ohuh}/></Link> <Navbar.Brand href="/"><Image src={ohuh}/></Navbar.Brand>
<h2>회원가입</h2> </Navbar>
<Row className= 'mt-3 flex-column align-items-center justify-content-center'>
<h2>회원가입</h2>
<Col md={5}> <Col md={5}>
{error && <Alert variant='danger'> {error && <Alert variant='danger'>
{error} {error}
...@@ -69,7 +71,7 @@ function Signup() { ...@@ -69,7 +71,7 @@ function Signup() {
<Form.Label>비밀번호</Form.Label> <Form.Label>비밀번호</Form.Label>
<Form.Control name='password' type='password' value={user.password} onChange={handleChange}/> <Form.Control name='password' type='password' value={user.password} onChange={handleChange}/>
</Form.Group> </Form.Group>
<Button disabled={disabled} type='submit' block>확인</Button> <Button variant="info" disabled={disabled} type='submit' block>확인</Button>
</Form> </Form>
</Col> </Col>
</Row> </Row>
......
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