diff --git a/services/web/frontend/js/features/source-editor/components/grammarly-advert.tsx b/services/web/frontend/js/features/source-editor/components/grammarly-advert.tsx index c66cac0827..67608144f5 100644 --- a/services/web/frontend/js/features/source-editor/components/grammarly-advert.tsx +++ b/services/web/frontend/js/features/source-editor/components/grammarly-advert.tsx @@ -13,12 +13,9 @@ export default function GrammarlyAdvert() { const hasDismissedGrammarlyAdvert = customLocalStorage.getItem( 'editor.has_dismissed_grammarly_advert' ) - // promotion ends on december 16th, 2023 at 00:00 UTC - const promotionEnded = - new Date() > new Date(Date.UTC(2023, 11, 16, 0, 0, 0)) const showGrammarlyAdvert = - grammarlyInstalled && !hasDismissedGrammarlyAdvert && !promotionEnded + grammarlyInstalled && !hasDismissedGrammarlyAdvert if (showGrammarlyAdvert) { eventTracking.sendMB('grammarly-advert-shown') @@ -35,8 +32,36 @@ export default function GrammarlyAdvert() { if (!show) { return null } + // promotion ends on december 16th, 2023 at 00:00 UTC + const promotionEnded = new Date() > new Date(Date.UTC(2023, 11, 16, 0, 0, 0)) - return ( + const permanentOffer = ( +
+
+
+

+ Love Grammarly? Then you're in luck! Get 25% off Grammarly Premium + with this exclusive offer for Overleaf users. +

+ eventTracking.sendMB('grammarly-advert-clicked')} + href="https://grammarly.go2cloud.org/aff_c?offer_id=373&aff_id=142242" + target="_blank" + rel="noopener" + > + Claim my discount + +
+
+ +
+
+
+ ) + const promoOffer = (
@@ -62,4 +87,5 @@ export default function GrammarlyAdvert() {
) + return promotionEnded ? permanentOffer : promoOffer }