From b55590658518f56d3acf53c3973322f34b5ac265 Mon Sep 17 00:00:00 2001 From: Mark Saroufim Date: Wed, 22 Jul 2026 09:35:53 -0700 Subject: [PATCH 1/2] Simplify calendar subscription instructions --- frontend/src/pages/lectures/Lectures.tsx | 98 +++++++++++++++++++----- 1 file changed, 78 insertions(+), 20 deletions(-) diff --git a/frontend/src/pages/lectures/Lectures.tsx b/frontend/src/pages/lectures/Lectures.tsx index 0a28941..1fb6f9a 100644 --- a/frontend/src/pages/lectures/Lectures.tsx +++ b/frontend/src/pages/lectures/Lectures.tsx @@ -345,14 +345,16 @@ export default function Lectures() { const [events, setEvents] = useState([]); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); - const [calendarCopyError, setCalendarCopyError] = useState(false); + const [calendarCopyStatus, setCalendarCopyStatus] = useState< + "idle" | "copied" | "error" + >("idle"); - const openGoogleCalendarSubscription = async () => { + const handleCopyCalendarUrl = async () => { try { await copyCalendarFeedUrl(); - window.location.assign(GOOGLE_CALENDAR_ADD_BY_URL); + setCalendarCopyStatus("copied"); } catch { - setCalendarCopyError(true); + setCalendarCopyStatus("error"); } }; @@ -440,26 +442,82 @@ export default function Lectures() { . - - - {calendarCopyError - ? `Copy ${LECTURE_CALENDAR_FEED_URL}, then open Google Calendar → Other calendars → From URL.` - : "Paste the copied URL into “URL of calendar,” then click Add calendar. You only need to do this once."} - + + 1. Copy this calendar URL: + + + + {LECTURE_CALENDAR_FEED_URL} + + + + {calendarCopyStatus === "error" && ( + + Could not copy automatically. Select and copy the URL above. + + )} + + 2. Open Google Calendar and paste it into “URL of calendar.” + + + + Click Add calendar. You only need to do this once. + + {loading ? ( ) : error ? ( From fbf5b419187ad9eb07c0f193dd722e977874341e Mon Sep 17 00:00:00 2001 From: Mark Saroufim Date: Wed, 22 Jul 2026 09:41:30 -0700 Subject: [PATCH 2/2] Clean up event page sections --- frontend/src/pages/lectures/Lectures.tsx | 27 ++++++------------------ 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/frontend/src/pages/lectures/Lectures.tsx b/frontend/src/pages/lectures/Lectures.tsx index 1fb6f9a..3f711bc 100644 --- a/frontend/src/pages/lectures/Lectures.tsx +++ b/frontend/src/pages/lectures/Lectures.tsx @@ -329,14 +329,6 @@ function LectureCard({ event }: { event: DiscordEvent }) { {event.description && ( {event.description} )} - - View on Discord (Add to Calendar) - ); } @@ -392,19 +384,14 @@ export default function Lectures() { featuring experts in GPU programming. - {/* In Person Events Section */} - - In Person Events - {activeInPerson.length === 0 ? ( - - No in-person events currently scheduled. Check back soon! - - ) : ( - activeInPerson.map((event) => ( + {activeInPerson.length > 0 && ( + + In Person Events + {activeInPerson.map((event) => ( - )) - )} - + ))} + + )} {/* Kernel Competitions Section */}