diff --git a/package-lock.json b/package-lock.json index 0a6bc41..d21cd60 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10036,7 +10036,7 @@ }, "prettier": { "version": "2.0.5", - "resolved": "https://npm.mlabs.pl:443/prettier/-/prettier-2.0.5.tgz", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz", "integrity": "sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==", "dev": true }, diff --git a/src/components/SchedulerRow.tsx b/src/components/SchedulerRow.tsx index c1cbd09..9fb9065 100644 --- a/src/components/SchedulerRow.tsx +++ b/src/components/SchedulerRow.tsx @@ -1,4 +1,4 @@ -import React, { MouseEvent, useState } from 'react'; +import React, { Fragment, MouseEvent, useState } from 'react'; import { GroupType, SchedulerEvent } from '../types'; import styled from 'styled-components/macro'; import Popover from '@material-ui/core/Popover'; @@ -104,7 +104,7 @@ export const SchedulerRow = ({ groups, indexRow, rowTop, cellWidth, cellHeight } {groups.map( (group, index) => group.day === eventIndex && ( - <> + {groups[index].room}

- +
), )} diff --git a/src/contexts/CoursesProvider.tsx b/src/contexts/CoursesProvider.tsx index f7fd50d..1d04fad 100644 --- a/src/contexts/CoursesProvider.tsx +++ b/src/contexts/CoursesProvider.tsx @@ -135,13 +135,15 @@ export const CoursesProvider = ({ children }: CoursesProviderProps) => { console.log('courses: ', courses); setCourses(sortedCourses); } catch (e) { - console.log(e); + console.log(e); } }; useEffect(() => { - fetchCourses(); - getNewestTimetable(); + setTimeout(() => { + fetchCourses(); + getNewestTimetable(); + }, 200); }, []); return (