From 2a7945a74c385f8493bde987456c88f7d6414b1b Mon Sep 17 00:00:00 2001 From: Leo McArdle Date: Tue, 26 Nov 2024 16:25:36 +0000 Subject: [PATCH] chore(scrimba): add end of year banners (#12184) https://mozilla-hub.atlassian.net/browse/MP-1765 --- client/src/ui/organisms/placement/index.tsx | 35 ++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/client/src/ui/organisms/placement/index.tsx b/client/src/ui/organisms/placement/index.tsx index dd35633fec44..9fb5263c7e02 100644 --- a/client/src/ui/organisms/placement/index.tsx +++ b/client/src/ui/organisms/placement/index.tsx @@ -83,8 +83,41 @@ function TopPlacementFallbackContent() { const observedNode = useViewed(() => { gleanClick(BANNER_SCRIMBA_VIEW); }); + const now = Date.now(); - return ( + return now < Date.parse("2024-12-01") ? ( +

+ Learn front-end with MDN’s course partner{" "} + { + gleanClick(BANNER_SCRIMBA_CLICK); + }} + > + Scrimba + {" "} + - 30% discount this week! +

+ ) : now < Date.parse("2024-12-25") ? ( +

+ Take our daily challenges on Scrimba until 24th December and win exciting + prizes.{" "} + { + gleanClick(BANNER_SCRIMBA_CLICK); + }} + > + Join now + +

+ ) : (

Learn front-end development with high quality, interactive courses from{" "}