diff --git a/src/components/root/Pages/Book.js b/src/components/root/Pages/Book.js index 0115407..d2e346a 100644 --- a/src/components/root/Pages/Book.js +++ b/src/components/root/Pages/Book.js @@ -1,5 +1,6 @@ import React, { Component } from "react"; +import { callAPI } from "../../actions/API"; import FormPage from "../common/Forms/FormPage"; // Parent page for the Book component, @@ -10,9 +11,22 @@ export default class Book extends Component { super(props); this.state = { migs: [], + timeslots: [], }; } + + componentDidMount() { + callAPI + .get('/gettimeslots/') + .then( (response) => { + this.setState({ + timeslots: response.data + }) + }) + } + render() { + if (this.state.timeslots.length > 0) { return (