From 27093344e987f71b61ba131f65b1ba0bbdc443be Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 4 Oct 2023 15:30:47 +0200 Subject: [PATCH] Merge pull request #15088 from overleaf/tm-fix-writefull-analytics Fix writefull logic so promo-prompt is not sent if not shown GitOrigin-RevId: c08ae63c269ee30aaf4c831fdf46d170df3d45f3 --- .../notifications/user-notifications.tsx | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) 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 39cb727c56..3046435d3a 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 @@ -50,7 +50,7 @@ function UserNotifications() { // Temporary workaround to prevent also showing groups/enterprise banner const [showWritefull, setShowWritefull] = useState(() => { - if (isChromium()) { + if (isChromium() && !showBackToSchoolModal) { const show = getMeta('ol-showWritefullPromoBanner') && !customLocalStorage.getItem('has_dismissed_writefull_promo_banner') @@ -93,17 +93,14 @@ function UserNotifications() { splitTestName={inrGeoBannerSplitTestName} /> ) : null} - {showBackToSchoolModal ? ( - - ) : ( - { - setDismissedWritefull(true) - }} - /> - )} + {showBackToSchoolModal && } + { + setDismissedWritefull(true) + }} + /> )