import React, { useState, useEffect } from 'react'; import { Field, Formik } from 'formik'; import axios from 'axios'; import { render } from 'react-dom'; import { Link, Redirect } from 'react-router-dom'; import styled from 'styled-components'; function List(props) { function remove() { console.log(props._id) axios.delete(`/reserves/${props._id}`, { data: { _id: props._id, }}) .then(res => { if (res.status === 404) return alert(res.data.error) alert("신청이 완료되었습니다!") }) .catch(err => { alert(err.error) }); }; return (
날짜 : {props.date}
이름 : {props.name}
강의실 : {props.room}
시간 : {props.time}
사용인원 : {props.num}
{props._id}
) } export default List;