diff --git a/src/sections/Community/Event-single/EventSingle.style.js b/src/sections/Community/Event-single/EventSingle.style.js index 4a363f326d5a..d70aa87ec2f8 100644 --- a/src/sections/Community/Event-single/EventSingle.style.js +++ b/src/sections/Community/Event-single/EventSingle.style.js @@ -9,6 +9,9 @@ const EventSinglePageWrapper = styled.div` div.event-title { text-align: center; margin-bottom: 4rem; + h3 { + color:black; + } } ul.speakers { margin-left:0px; diff --git a/src/sections/Community/Event-single/index.js b/src/sections/Community/Event-single/index.js index b7e0eb496fb0..69dc8989a574 100644 --- a/src/sections/Community/Event-single/index.js +++ b/src/sections/Community/Event-single/index.js @@ -52,8 +52,13 @@ const EventSingle = ({ data }) => { //const frontmatter = ({speakers = []}); const { frontmatter, body } = data.mdx; - - + const isEventPassed = () => { + const eventDate = new Date(frontmatter.date); + const currentDate = new Date(); + return eventDate < currentDate; + }; + const isEventUrlSpecified = !!frontmatter.eurl; + const showJoinUsButton = !isEventPassed() && isEventUrlSpecified; return ( { ))} -
- -
+ {showJoinUsButton && ( +
+ +
+ )} { return ; -}; \ No newline at end of file +};