import { FormEventHandler } from 'react'; import { makeAPIPostCall } from '../api/utils'; import Card from '@material-ui/core/Card'; import CardContent from '@material-ui/core/CardContent'; import { makeStyles } from '@material-ui/core/styles'; import Button from '@material-ui/core/Button'; import Typography from '@material-ui/core/Typography'; import CloudUploadIcon from '@material-ui/icons/CloudUpload'; import { useState, useEffect } from 'react'; const useStyles = makeStyles((theme) => ({ root: { maxWidth: 345, }, media: { height: 140, }, button: { margin: theme.spacing(1), }, })); const CreatePool = () => { const [title, setTitle] = useState('No Title'); const [capacity, setCapacity] = useState(0); const [start, setStart] = useState(''); const [end, setEnd] = useState(''); const [direction, setDirection] = useState('pickup'); const [type, setType] = useState('offer'); const [description, setDescription] = useState(''); const classes = useStyles(); const onClick = () => { console.log({ title: title, description: description, start_time: start, end_time: end, capacity, direction, type, }); makeAPIPostCall('/pool', { title: title, description: description, start_time: start, end_time: end, capacity, direction, type, }); }; useEffect(() => {}, []); return (