Skip to content

Commit

Permalink
Fix workshop calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
nf-s committed Oct 17, 2024
1 parent be6a312 commit 3ce8bb3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/DayView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ function parseDays(day: Day): {
return acc.concat(curr);
}, []);

let intervalOverride: number | null = null;

if (day.date === "2024-11-06")
events.push({
id: 99999,
Expand All @@ -247,6 +249,8 @@ function parseDays(day: Day): {
title: "Fake event to fix calendar between lightning talks and dinner",
});

if (day.date === "2024-11-05") intervalOverride = 30;

events.sort((a, b) => timeToMinutes(a.start) - timeToMinutes(b.start));

const intervals: Interval[] = [];
Expand All @@ -259,7 +263,7 @@ function parseDays(day: Day): {
? startTime + duration
: timeToMinutes(events[i + 1].start) / 60;

const intervalSize = decideInterval(duration);
const intervalSize = intervalOverride ?? decideInterval(duration);

// Check if the interval already exists
if (
Expand Down Expand Up @@ -335,6 +339,7 @@ const DayView = ({ day }: { day: Day }) => {
};

const roomWidths: Record<string, number> = {
"University of Tasmania Studio Theatre": 170,
"Hobart CBD and Surrounds": 150,
Atrium: 150,
};
Expand Down

0 comments on commit 3ce8bb3

Please sign in to comment.