The Git tag for this section is fetching-todays-appointments.
In this section, we'll repeat almost the same thing. We'll load data into our AppointmentsDayView component so that the user can view a list of appointments occurring today. However, the endpoint for retrieving appointments is more complicated than /availableTimeSlots: this time, we need to pass in a time range:
GET /appointments/<from>-<to>
We'll do that by building a new component, AppointmentsDayViewLoader. Follow these steps to get started:
- Create a new file, test/AppointmentsDayViewLoader.test.js. Start by adding the imports:
import React from 'react';
import 'whatwg-fetch';
import { createContainer } from './domManipulators';
import { fetchResponseOk } from './spyHelpers';
import {
AppointmentsDayViewLoader
} from &apos...