From af5e29c88d01cbb2ec221553b69bb832f3d67606 Mon Sep 17 00:00:00 2001 From: Vivek Vishal Date: Sun, 22 Sep 2024 19:36:11 +0530 Subject: [PATCH 1/3] add logic to disable eurl Signed-off-by: Vivek Vishal --- src/sections/Community/Event-single/index.js | 25 +++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) 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 && ( +
+ +
+ )} Date: Sun, 22 Sep 2024 19:36:52 +0530 Subject: [PATCH 2/3] rm unused date format Signed-off-by: Vivek Vishal --- src/templates/event-single.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/templates/event-single.js b/src/templates/event-single.js index 985a04567156..1085b5420e7d 100644 --- a/src/templates/event-single.js +++ b/src/templates/event-single.js @@ -23,7 +23,7 @@ export const query = graphql`query EventsBySlug($slug: String!) { type speakers register - date(formatString: "MMM Do, YYYY") + date thumbnail { publicURL relativePath @@ -59,4 +59,4 @@ export default EventSinglePage; export const Head = ({ data }) => { return ; -}; \ No newline at end of file +}; From 7c2a92725f476b3ab6ba0b5fb5234885d217bbdf Mon Sep 17 00:00:00 2001 From: Vivek Vishal Date: Sun, 22 Sep 2024 21:19:04 +0530 Subject: [PATCH 3/3] Update EventSingle.style.js Signed-off-by: Vivek Vishal --- src/sections/Community/Event-single/EventSingle.style.js | 3 +++ 1 file changed, 3 insertions(+) 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;