Commit ded7f980 authored by Ha YeaJin's avatar Ha YeaJin
Browse files

비염 너무 힘드러

parent 9e22fd14
......@@ -41,7 +41,7 @@ function Menu() {
if (state) return <Redirect to="/" />
return (
<MENU expand="md" variant="dark">
<Navbar.Brand href="#">대관 서비스</Navbar.Brand>
<Navbar.Brand as={Link} to="/home">대관 서비스</Navbar.Brand>
<Navbar.Toggle aria-controls="basic-navbar-nav" />
<Navbar.Collapse id="basic-navbar-nav">
<Nav className="mr-auto">
......
This diff is collapsed.
......@@ -25,11 +25,6 @@ const Wow = styled.div`
content: '비밀번호가 일치하지 않습니다.';
color: red;
}
& .asd {
display: flex;
flex-direction: column;
}
`
function Signup() {
......@@ -46,7 +41,7 @@ function Signup() {
</Menu>
<Container fluid>
<Wow className="row justify-content-center">
<Col md={3} xs={11} className="p-0">
<Col md={3} xs={11} className="p-0">
<Formik
initialValues={{ name: '', id: '', password: '', password2: '', question: '', answer: '' }}
validationSchema={Yup.object({
......@@ -91,7 +86,7 @@ function Signup() {
getFieldProps, // contain values, handleChange, handleBlur
isSubmitting,
}) => (
< form onSubmit={handleSubmit} className="asd">
<form onSubmit={handleSubmit} className="d-flex flex-column pt-3">
<div className="form-group ">
<div className={touched.name && errors.name ? "text-danger" : ""}>이름을 입력하세요</div>
<input
......@@ -154,7 +149,7 @@ function Signup() {
{...getFieldProps('answer')}
placeholder="Input answer" />
</div>
<Button type="submit" variant="secondary" disabled={isSubmitting}>회원가입</Button>
<Button type="submit" variant="secondary" className="mb-2" disabled={isSubmitting}>회원가입</Button>
<Button variant="outline-secondary" as={Link} to="/login">로그인하러 가기</Button>
</form>
)}
......
......@@ -3,7 +3,7 @@ import { Link, Redirect } from 'react-router-dom';
import Menu from '../Components/Menu';
import * as Yup from 'yup';
import axios from 'axios';
import { Container, Row, Col } from 'react-bootstrap';
import { Container, Row, Col, Form } from 'react-bootstrap';
import { Field, Formik } from 'formik';
function Write() {
......@@ -18,7 +18,7 @@ function Write() {
<Menu />
<Container fluid>
<Row className="justify-content-center">
<Col md={12} xl={8} style={{ height: "35em" }}>
<Col md={5} xs={11} className="pt-3" >
<Formik
initialValues={{ title: '', content: '' }}
validationSchema={Yup.object({
......@@ -52,11 +52,23 @@ function Write() {
getFieldProps, // contain values, handleChange, handleBlur
isSubmitting,
}) => (
<form onSubmit={handleSubmit} className="asd">
{/* col-sm-3 */}
// <Form onSubmit={handleSubmit}>
// <Form.Group>
// <Form.Label variant={touched.name && errors.name ? "danger" : ""}>제목</Form.Label>
// <Form.Control className={(touched.name && errors.name ? 'form-control is-invalid' : "form-control")}
// type="text"
// placeholder="제목"
// title="title"
// {...getFieldProps('title')} />
// </Form.Group>
// <Form.Group>
// <Form.Label>내용</Form.Label>
// <Form.Control as="textarea" rows={10} />
// </Form.Group>
// </Form>
<form onSubmit={handleSubmit}>
<div className="form-group">
{/* mb-4 */}
<div className={touched.name && errors.name ? "text-danger" : ""}>제목</div>
<input className={(touched.name && errors.name ? 'form-control is-invalid' : "form-control")}
type="text"
......@@ -64,8 +76,8 @@ function Write() {
{...getFieldProps('title')}
placeholder="제목" />
</div>
<div className="form-group ">
{/* mb-4 */}
<div className={touched.name && errors.name ? "text-danger" : ""}>내용</div>
<input className={(touched.name && errors.name ? 'form-control is-invalid' : "form-control")}
type="text"
......@@ -73,6 +85,7 @@ function Write() {
{...getFieldProps('content')}
placeholder="내용" />
</div>
<button type="submit" className="btn btn-dark" disabled={isSubmitting}>공지 등록</button>
</form>
)}
......@@ -83,5 +96,5 @@ function Write() {
</div>
)
}
export default Write
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