Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
feat(ui): Message when no result found
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanaelhoun committed Dec 18, 2021
1 parent 02ae8cf commit db0d079
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/Schedule/CompareSchedule.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ const CompareSchedule = ({ groups, config }) => {
allResponses.map((response) => response.data)
);

if (!byDays || Object.keys(byDays).length === 0) {
return <p style={{ textAlign: "center" }}>Aucun cours n'a été trouvé pour cette période.</p>;
}

const numCols = Math.max(
0,
parseInt(variables.maxColumns) - Math.floor(Object.keys(groups).length / 2)
Expand Down

0 comments on commit db0d079

Please sign in to comment.