Skip to content

Commit

Permalink
chore(scrimba): add end of year banners (#12184)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoMcA authored Nov 26, 2024
1 parent ca49d0c commit 2a7945a
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion client/src/ui/organisms/placement/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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") ? (
<p className="fallback-copy">
Learn front-end with MDN’s course partner{" "}
<a
href="https://scrimba.com/learn/frontend?via=mdn"
target="_blank"
rel="noreferrer"
ref={observedNode}
onClick={() => {
gleanClick(BANNER_SCRIMBA_CLICK);
}}
>
Scrimba
</a>{" "}
- 30% discount this week!
</p>
) : now < Date.parse("2024-12-25") ? (
<p className="fallback-copy">
Take our daily challenges on Scrimba until 24th December and win exciting
prizes.{" "}
<a
href="https://scrimba.com/learn/frontend?via=mdn"
target="_blank"
rel="noreferrer"
ref={observedNode}
onClick={() => {
gleanClick(BANNER_SCRIMBA_CLICK);
}}
>
Join now
</a>
</p>
) : (
<p className="fallback-copy">
Learn front-end development with high quality, interactive courses from{" "}
<a
Expand Down

0 comments on commit 2a7945a

Please sign in to comment.