diff --git a/src/components/root/Home.js b/src/components/root/Home.js index e243809..9c3f462 100644 --- a/src/components/root/Home.js +++ b/src/components/root/Home.js @@ -3,6 +3,8 @@ import React, { Component } from "react"; import { callAPI } from "../actions/API"; import Cards from "./Pages/Cards"; import GenericList from "../root/Pages/GenericList"; +import { UList } from "../root/common/Functionality/UnorderedList"; +import { builfArrayFromObject } from "../actions/Error"; // Homepage/Cards, first API call here to pass down to cards // and the pending migration list, if there's no data, nothing will show @@ -17,6 +19,7 @@ export class Home extends Component { super(props); this.state = { migs: [], + timeslots: [], }; } @@ -33,6 +36,18 @@ export class Home extends Component { error: error, }); }); + callAPI + .get("/timeslots") + .then((request) => { + this.setState({ + timeslots: request.data, + }); + }) + .catch((error) => { + this.setState({ + error: error, + }); + }); } render() { @@ -45,13 +60,13 @@ export class Home extends Component {
-

Migrations tracker

- {/* */} +

Current availability for {Date()}

+
- +
@@ -61,4 +76,4 @@ export class Home extends Component { } } -export default Home; \ No newline at end of file +export default Home;