From db0d0797e4a0d853f4c37b5ed7c08e9fc42d1a53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathana=C3=ABl=20Houn?= Date: Sat, 18 Dec 2021 22:25:25 +0100 Subject: [PATCH] feat(ui): Message when no result found --- src/components/Schedule/CompareSchedule.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/Schedule/CompareSchedule.jsx b/src/components/Schedule/CompareSchedule.jsx index d020dd2..95ac6c8 100644 --- a/src/components/Schedule/CompareSchedule.jsx +++ b/src/components/Schedule/CompareSchedule.jsx @@ -45,6 +45,10 @@ const CompareSchedule = ({ groups, config }) => { allResponses.map((response) => response.data) ); + if (!byDays || Object.keys(byDays).length === 0) { + return

Aucun cours n'a été trouvé pour cette période.

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