diff --git a/src/components/game/EventForm.js b/src/components/game/EventForm.js new file mode 100644 index 0000000..b90a915 --- /dev/null +++ b/src/components/game/EventForm.js @@ -0,0 +1,67 @@ +import React, { useState, useEffect } from "react" +import { useHistory } from 'react-router-dom' +import { createEvent } from './EventManager' + + +export const EventForm = () => { + const history = useHistory() + const [eventTypes, setEventTypes] = useState([]) + + /* + Since the input fields are bound to the values of + the properties of this state variable, you need to + provide some default values. + */ + const [currentEvent, setCurrentEvent] = useState({ + skillLevel: 1, + Description: "", + date: "", + time: "", + game_id: 1, + organizer_id: 1 + }) + + useEffect(() => { + // TODO: Get the event types, then set the state + }, []) + + const changeEventState = (domEvent) => { + // TODO: Complete the onChange function + } + + return ( +
+ ) +} \ No newline at end of file