-
Notifications
You must be signed in to change notification settings - Fork 0
/
PostWritePage.jsx
34 lines (24 loc) · 999 Bytes
/
PostWritePage.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import React, {useState} from "react";
import styled from "styled-components";
import Button from "../ui/button";
import TextInput from "../ui/TextInput";
import { useNavigate } from "react-router-dom";
const Wrapper = styled.div`
`;
const Container = styled.div`
`;
function PostWritePage(props){
const [title, setTitle] = useState('');
const [content, setContent] = useState('');
const navigate = useNavigate();
return(
<Wrapper>
<Container>
<TextInput height={48} placeholder="제목을 입력하세요." value={title} onChange={(e)=> setTitle(e.target.value)}></TextInput>
<TextInput height={480} placeholder="제목을 입력하세요." value={content} onChange={(e)=> setContent(e.target.value)}></TextInput>
<Button title='글 작성하기' onClick={()=> {navigate('/')}}></Button>
</Container>
</Wrapper>
)
}
export default PostWritePage;