Skip to content
Open
Changes from 1 commit
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
7 changes: 5 additions & 2 deletions pages/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -546,7 +549,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