From ef197cdd65af1930ae1509774658ffcb0fc947af Mon Sep 17 00:00:00 2001 From: tusharv01 Date: Fri, 27 Mar 2026 16:04:37 +0530 Subject: [PATCH 1/3] fix: handle calendar fetch failure and prevent UI crash --- pages/index.page.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pages/index.page.tsx b/pages/index.page.tsx index 6761137ab..f74663cd9 100644 --- a/pages/index.page.tsx +++ b/pages/index.page.tsx @@ -51,7 +51,10 @@ export const getStaticProps: GetStaticProps = async () => { 'https://calendar.google.com/calendar/ical/info%40json-schema.org/public/basic.ics'; const datesInfo = await fetchRemoteICalFile(remoteICalUrl) .then((icalData: any) => printEventsForNextWeeks(ical.parseICS(icalData))) - .catch((error) => console.error('Error:', error)); + .catch((error) => { + console.error('Error:', error); + return null; + }); return { props: { blogPosts, @@ -546,7 +549,7 @@ const Home = (props: any) => { Upcoming events