resolved key issue

This commit is contained in:
Maciek Głowacki 2020-11-22 17:21:22 +01:00
parent 6de97c107e
commit 9ae0ba509d
3 changed files with 9 additions and 7 deletions

2
package-lock.json generated
View File

@ -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
},

View File

@ -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 && (
<>
<Fragment key={index}>
<StyledSchedulerEvent
groupType={group.type}
cellWidth={cellWidth}
@ -148,7 +148,7 @@ export const SchedulerRow = ({ groups, indexRow, rowTop, cellWidth, cellHeight }
<p>{groups[index].room}</p>
</StyledTypography>
</Popover>
</>
</Fragment>
),
)}
</SchedulerEventsWrapper>

View File

@ -140,8 +140,10 @@ export const CoursesProvider = ({ children }: CoursesProviderProps) => {
};
useEffect(() => {
setTimeout(() => {
fetchCourses();
getNewestTimetable();
}, 200);
}, []);
return (