From d78c6fd66342e7312d6e048fd031dcebb2b0a084 Mon Sep 17 00:00:00 2001 From: Adam Jones Date: Fri, 9 Aug 2024 17:13:22 +0100 Subject: [PATCH] bugfix: Fix TimeAvWidget display for different unit sizes --- frontend/components/TimeAvWidget.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/components/TimeAvWidget.tsx b/frontend/components/TimeAvWidget.tsx index ce1238b..0517152 100644 --- a/frontend/components/TimeAvWidget.tsx +++ b/frontend/components/TimeAvWidget.tsx @@ -29,9 +29,9 @@ export function TimeAvWidget({ availabilities }: TimeAvWidgetProps) { const unitsPerHour = 60 / MINUTES_IN_UNIT; const unitIndexes = zeroUntilN(7 * 24 * unitsPerHour); - const cellHeight = 2; + const cellHeight = 1.5; const leftColumnWidth = 12; - const unitsPerLabel = 2; + const unitsPerLabel = unitsPerHour / 2; return (
@@ -71,7 +71,7 @@ export function TimeAvWidget({ availabilities }: TimeAvWidgetProps) {
{unitIndexes.map((number) => { const relevantAvailabilities = availabilities.filter(a => @@ -82,7 +82,7 @@ export function TimeAvWidget({ availabilities }: TimeAvWidgetProps) { return (
+ className={`h-${cellHeight} relative border-r border-b border-gray-800 border-r-solid`} style={{ borderBottomStyle: isEven ? "dotted" : "solid" }} > {relevantAvailabilities.map((a, i) => (
))}