From 70d0a025431d4f60b26192a23074a737e53a34e7 Mon Sep 17 00:00:00 2001 From: V Thulisile Sibanda <66913810+thulieblack@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:31:39 +0200 Subject: [PATCH] feat: update the banner to promote London CFP on the website (#1825) --- components/campaigns/AnnoucementHero.js | 26 ++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/components/campaigns/AnnoucementHero.js b/components/campaigns/AnnoucementHero.js index f85a6cca4e79..ba77845b03bd 100644 --- a/components/campaigns/AnnoucementHero.js +++ b/components/campaigns/AnnoucementHero.js @@ -4,24 +4,24 @@ import Heading from '../typography/Heading' import Container from '../layout/Container' import AnnouncementRemainingDays from './AnnouncementRamainingDays' -function shouldShowBanner() { - const month = new Date().getUTCMonth(); - const year = new Date().getUTCFullYear(); - - //month=4 is May - if (year > 2023 || month !== 4) { +function shouldShowBanner(cfpDeadline) { + const currentDate = new Date(); // Get the current date + const deadline = new Date(cfpDeadline); // Convert the cfpDeadline string to a Date object + + // Check if the current date is after the deadline + if (currentDate > deadline) { return false; } + return true; } - export default function AnnouncementHero({ className = '', small = false, hideVideo = false }) { //return null; - const showBanner = shouldShowBanner(); + const cfpDeadline = '2023-07-28T06:00:00Z' + const showBanner = shouldShowBanner(cfpDeadline); if (!showBanner) return null; - const cfpDeadline = '2023-05-31T06:00:00Z' return ( @@ -42,15 +42,15 @@ export default function AnnouncementHero({ className = '', small = false, hideVi level="h3" typeStyle="heading-sm" > - Madrid Edition + London Edition - October, 2023 | Madrid, Spain + 20th of September, 2023 | London, UK - +