From 58292f71ebb659d2ca819e086bb688ef34a54e8c Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Mon, 26 Feb 2024 12:16:40 +0000 Subject: [PATCH] Merge pull request #17287 from overleaf/jpa-wf-promo-change [web] show plans page variant of Writefull promo w/ extension installed GitOrigin-RevId: 41fcccb3b1f70aadf0cb641a556e78c11b74e4d0 --- .../components/notifications/user-notifications.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/services/web/frontend/js/features/project-list/components/notifications/user-notifications.tsx b/services/web/frontend/js/features/project-list/components/notifications/user-notifications.tsx index 58b64cb199..8463ca4ea5 100644 --- a/services/web/frontend/js/features/project-list/components/notifications/user-notifications.tsx +++ b/services/web/frontend/js/features/project-list/components/notifications/user-notifications.tsx @@ -80,6 +80,15 @@ function UserNotifications() { }) const [dismissedWritefull, setDismissedWritefull] = useState(false) + const hasWritefullExtensionAlreadyInstalled = + window.writefull?.type === 'extension' + const usesWritefullIntegration = + writefullIntegrationSplitTestEnabled || user?.writefull?.enabled + const writefullBannerVariant = + hasWritefullExtensionAlreadyInstalled || usesWritefullIntegration + ? 'plans-page' + : 'chrome-store' + return (
{!showWritefull && !dismissedWritefull && } {showInrGeoBanner && } - {writefullIntegrationSplitTestEnabled || user?.writefull?.enabled ? ( + {writefullBannerVariant === 'plans-page' ? (