Skip to content

Commit

Permalink
Add banner
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Gilles committed Nov 22, 2024
1 parent b9594bc commit 0334f1c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ module.exports = {
respectPrefersColorScheme: false,
},
announcementBar: {
id: "lancement_kit_demarrage_officiel",
id: "black_friday_2024",
content:
'Lancement du <a href="/fr/starter-kit/">kit de démarrage officiel</a> !',
backgroundColor: "#65c7f7",
textColor: "#091E42",
'Black Friday: Promo extrême sur le <a href="/fr/starter-kit/">kit de démarrage officiel</a> !!',
backgroundColor: "#ff5722",
textColor: "white",
isCloseable: true,
},
navbar: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ function Home({ integrations, lang }) {
)}
href="/fr/starter-kit/"
>
Le kit de démarrage officiel !
Black Friday: Promo sur le kit de démarrage !
</Link>
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/starter-kit.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function Plus() {
setKitsRemaining(data.remaining);
setPrice(data.price);
setCouponCode(data.validCoupon);
setIsLowStock(progressPercentage >= 50);
setIsLowStock(progressPercentage >= 50 || data.remaining <= 5);
if (data.total !== undefined && data.remaining !== undefined) {
const progressPercentage =
((data.total - data.remaining) / data.total) * 100;
Expand Down

0 comments on commit 0334f1c

Please sign in to comment.