diff --git a/src/lib/components/events/TodayEvents.tsx b/src/lib/components/events/TodayEvents.tsx index ea3dbb2..eb1dccc 100644 --- a/src/lib/components/events/TodayEvents.tsx +++ b/src/lib/components/events/TodayEvents.tsx @@ -40,7 +40,9 @@ const TodayEvents = ({ {todayEvents.map((event, i) => { const height = differenceInMinutes(event.end, event.start) * minuteHeight - BORDER_HEIGHT; - const minituesFromTop = Math.abs(startHour - event.start.getHours()) * 60; + const minituesFromTop = Math.abs( + startHour * 60 - event.start.getHours() * 60 - event.start.getMinutes() + ); const topSpace = minituesFromTop * minuteHeight; /** Add border factor to height of each slot */ const slots = height / 60;