Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions pages/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,17 @@ 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));
return { props: { blogPosts, datesInfo, fallback: false } };
.catch((error) => {
console.error('Error:', error);
return null;
});
return {
props: {
blogPosts,
datesInfo,
fallback: false,
},
};
};

export function AlgoliaSearch() {
Expand Down Expand Up @@ -548,7 +557,7 @@ const Home = (props: any) => {
<Headline4>Upcoming events</Headline4>
<div>
<ul>
{props.datesInfo.map((event: any, index: any) => (
{props?.datesInfo?.map((event: any, index: any) => (
<li key={index}>
<div className='flex mb-4'>
<p className='bg-btnOrange rounded-full w-10 h-10 p-2 text-center text-white mr-2'>
Expand Down
Loading