Skip to content

Commit

Permalink
Remove current event
Browse files Browse the repository at this point in the history
  • Loading branch information
martink635 committed Jan 29, 2024
1 parent dc9d99a commit f953e2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
9 changes: 7 additions & 2 deletions components/sections/EventPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import { useState } from "react";
import { cx } from "utils";

type EventPopupType = {
image: {
image?: {
src: string;
alt: string;
};
cta: {
href: string;
title: string;
};
title: string;
title?: string;
content?: string;
};

Expand All @@ -33,6 +33,11 @@ const EventPopup = ({ image, title, content, cta }: EventPopupType) => {
return null;
}

// if image, title are null, return null
if (!image || !title) {
return null;
}

return (
<RegularLink
href={cta.href}
Expand Down
5 changes: 0 additions & 5 deletions data/pages/index.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
{
"event": {
"title": "Community Call",
"content": "Swarm Foundations monthly community call on January 25.",
"cta": {
"href": "https://www.addevent.com/event/iH19625610",
"title": "Add to Calendar ->"
},
"image": {
"src": "/assets/event-community_call-jan.png",
"alt": ""
}
},
"hero": {
Expand Down

0 comments on commit f953e2a

Please sign in to comment.