From 7b6be17e497b7678fd16a14bae33641fd5a9c46a Mon Sep 17 00:00:00 2001 From: V Thulisile Sibanda <66913810+thulieblack@users.noreply.github.com> Date: Tue, 7 May 2024 16:11:46 +0200 Subject: [PATCH] feat: add london cfp banner (#2931) Co-authored-by: Akshat Nema <76521428+akshatnema@users.noreply.github.com>%0ACo-authored-by: akshatnema --- components/campaigns/AnnoucementHero.js | 126 +++++++++++------------- 1 file changed, 56 insertions(+), 70 deletions(-) diff --git a/components/campaigns/AnnoucementHero.js b/components/campaigns/AnnoucementHero.js index 26e227297ed2..dde5686b2f77 100644 --- a/components/campaigns/AnnoucementHero.js +++ b/components/campaigns/AnnoucementHero.js @@ -20,14 +20,11 @@ function shouldShowBanner(cfpDeadline) { } export default function AnnouncementHero({ className = '', small = false, hideVideo = false }) { - //return null; - + const [activeIndex, setActiveIndex] = useState(0); - const cfpDeadlineIndia = '2023-11-30T06:00:00Z' - const cfpDeadlineFrance = '2023-12-06T06:00:00Z' - const showBannerIndia = shouldShowBanner(cfpDeadlineIndia); - const showBannerFrance = shouldShowBanner(cfpDeadlineFrance); + const cfpDeadlineLondon = '2024-07-12T06:00:00Z'; + const showBannerLondon = shouldShowBanner(cfpDeadlineLondon); const Banner = ({ title, dateLocation, cfaText, eventName, cfpDeadline, link, city, activeBanner }) => { return ( @@ -65,24 +62,14 @@ export default function AnnouncementHero({ className = '', small = false, hideVi const banners = [ { - title: "AsyncAPI Conf", - city: "Bengaluru", - dateLocation: "30th of November, 2023 | Bengaluru, India", - cfaText: "Grab Free Tickets", - eventName: "AACoT'23 Bengaluru Edition", - cfpDeadline: cfpDeadlineIndia, - link: "https://conference.asyncapi.com/venue/bangalore", - show: showBannerIndia - }, - { - title: "AsyncAPI Conf", - city: "Paris", - dateLocation: "8th of December, 2023 | Paris, France", - cfaText: "Get Free Tickets", - eventName: "AACoT'23 Paris Edition", - cfpDeadline: cfpDeadlineFrance, - link: "https://ticket.apidays.global/event/apidays-paris-2023/8a1f3904-e2be-4c69-a880-37d2ddf1027d/cart?coupon=ASYNCAPICONF23", - show: showBannerFrance + title: "AsyncAPI Conf on Tour'24", + city: "London", + dateLocation: "18 - 19 of September, 2024 | United Kingdom, London", + cfaText: "Apply To Speak", + eventName: "the end of Call for Speakers", + cfpDeadline: cfpDeadlineLondon, + link: "https://conference.asyncapi.com/venue/London", + show: showBannerLondon } ]; @@ -109,50 +96,49 @@ export default function AnnouncementHero({ className = '', small = false, hideVi }; }, [activeIndex]); - return '' - // return ( - // - //
- //
- // - //
- //
- //
- // {banners.map((banner, index) => ( - // banner.show && ( - // - // ) - // ))} - //
- //
- // {banners.map((banner, index) => ( - //
goToIndex(index)} - // /> - // ))} - //
- //
- //
- // - //
- //
- // - // ); + return ( + +
+ {numberOfVisibleBanners > 1 &&
+ +
} +
+
+ {banners.map((banner, index) => ( + banner.show && ( + + ) + ))} +
+
+ {banners.map((banner, index) => ( +
goToIndex(index)} + /> + ))} +
+
+ {numberOfVisibleBanners > 1 &&
+ +
} +
+ + ); }