import React, { useState, useEffect, useRef } from 'react'; import Menu from '../Components/Menu'; import axios from 'axios'; import styled from 'styled-components'; function Notice() { const [notices, setNotices] = useState([]); useEffect(() => { getNotice(); }, []); function dateForm(day) { const post_day = new Date(day); let year = post_day.getFullYear(); let month = post_day.getMonth() + 1; let date = post_day.getDate(); month = month < 10 ? '0' + month : month; date = date < 10 ? '0' + date : date; const new_date = year + "-" + month + "-" + date; return new_date } function getNotice() { axios.get(`/notices`) .then(res => { if (res.status !== 201) { alert(res.data.error); } console.log(res.data); setNotices(res.data); }) .catch(err => { alert(err.error) }); } return (

공지사항

Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
{/* {notices.map((notice, index) =>
{notice.notice_content}
)} */}
) } export default Notice;