Skip to content

Commit

Permalink
feat: update the banner to promote London CFP on the website (#1825)
Browse files Browse the repository at this point in the history
  • Loading branch information
thulieblack authored Jun 22, 2023
1 parent e17401c commit 70d0a02
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions components/campaigns/AnnoucementHero.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Container wide as="section" padding='' className='text-center'>
Expand All @@ -42,15 +42,15 @@ export default function AnnouncementHero({ className = '', small = false, hideVi
level="h3"
typeStyle="heading-sm"
>
Madrid Edition
London Edition
</Heading>
<Paragraph typeStyle="body-lg">
October, 2023 | Madrid, Spain
20th of September, 2023 | London, UK
</Paragraph>
<AnnouncementRemainingDays dateTime={cfpDeadline} eventName="the end for Call for Speakers." />
<AnnouncementRemainingDays dateTime={cfpDeadline} eventName="the end of Call for Speakers." />
<div className="mt-6 pb-2 space-x-2">
<Button
href="https://sessionize.com/aacot-madrid/"
href="https://conference.asyncapi.com/"
target="_blank"
text="Submit a session"
/>
Expand Down

0 comments on commit 70d0a02

Please sign in to comment.