From aa85ee5512c79cd7fad51adc0459f58eb8940f5c Mon Sep 17 00:00:00 2001 From: ygd58 Date: Wed, 1 Jul 2026 06:22:28 +0200 Subject: [PATCH] fix: tailwind typo, stale ICS date, and SSR browser safety - Fix 'flex-cols' typo to 'flex-col' in footer.tsx (invalid Tailwind class) - Update Office Hours ICS start date from 2025-11-06 to 2026-07-03 - Add typeof window check in downloadCalendarEvent to prevent SSR crash --- components/footer.tsx | 2 +- lib/utils.ts | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/components/footer.tsx b/components/footer.tsx index a4f6ac3..600e70e 100644 --- a/components/footer.tsx +++ b/components/footer.tsx @@ -35,7 +35,7 @@ export function Footer() { href={link.href} rel="noopener noreferrer" target="_blank" - className="flex flex-cols gap-2 justify-start items-center transition-colors hover:text-foreground"> + className="flex flex-col gap-2 justify-start items-center transition-colors hover:text-foreground"> {link.name} diff --git a/lib/utils.ts b/lib/utils.ts index 6cff270..a7e97b3 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -15,10 +15,10 @@ export function downloadCalendarEvent() { const location = "https://discord.com/events/1210468736205852672/1425703047253856287" const discordUrl = "https://discord.com/events/1210468736205852672/1425703047253856287" - // Start date: Thursday, Nov 6, 2025, 5:00 PM UTC - const startDate = new Date("2025-11-06T17:00:00Z") - // End date: Thursday, Nov 6, 2025, 6:00 PM UTC - const endDate = new Date("2025-11-06T18:00:00Z") + // Start date: Thursday, Jul 3, 2026, 5:00 PM UTC + const startDate = new Date("2026-07-03T17:00:00Z") + // End date: Thursday, Jul 3, 2026, 6:00 PM UTC + const endDate = new Date("2026-07-03T18:00:00Z") // Format dates in ICS format (YYYYMMDDTHHmmssZ) const formatICSDate = (date: Date): string => { @@ -71,7 +71,8 @@ export function downloadCalendarEvent() { 'END:VCALENDAR', ].join('\r\n') - // Create blob and download + // Create blob and download (browser-only) + if (typeof window === "undefined") return const blob = new Blob([icsContent], { type: 'text/calendar;charset=utf-8' }) const url = URL.createObjectURL(blob) const link = document.createElement('a')