Skip to content

Commit

Permalink
Import FacultyAPI object instead of free-standing function getFaculty…
Browse files Browse the repository at this point in the history
…SchedulesForYear

It turns out that you can no longer stub free-standing functions in Typescript 3.9.2+ according to this issue:

microsoft/TypeScript#38568
sinonjs/sinon#562
  • Loading branch information
natalynyu committed Aug 3, 2020
1 parent edfb9e9 commit 60dd16f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client/components/pages/Faculty/FacultyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import React, {
import { LoadSpinner } from 'mark-one';
import { FacultyResponseDTO } from 'common/dto/faculty/FacultyResponse.dto';
import { MessageContext } from 'client/context';
import { getFacultySchedulesForYear } from 'client/api';
import { FacultyAPI } from 'client/api';
import {
AppMessage,
MESSAGE_TYPE,
Expand Down Expand Up @@ -47,7 +47,7 @@ const FacultySchedule: FunctionComponent = function (): ReactElement {
*/
useEffect((): void => {
setFetching(true);
getFacultySchedulesForYear(acadYear)
FacultyAPI.getFacultySchedulesForYear(acadYear)
.then((facultySchedules): void => {
setFacultySchedules(facultySchedules[acadYear]);
})
Expand Down

0 comments on commit 60dd16f

Please sign in to comment.