- {format(getDayOfWeekAsDate(index), 'EEE', { locale: dateLocale })}
+ {data &&
+ daysOfWeek.map((index: number) => {
+ const day = data[index];
+ return (
+
+
+ {format(getDayOfWeekAsDate(index), 'EEE', { locale: dateLocale })}
+
+ {day?.map((hour: number) => {
+ const pct = hour / max;
+ return (
+
+ {hour > 0 && (
+
+
+
+ )}
+
+ );
+ })}
- {day?.map((hour: number) => {
- const pct = hour / max;
- return (
-
- {hour > 0 && (
-
-
-
- )}
-
- );
- })}
-