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
This commit is contained in:
Thomas 2023-10-04 15:30:47 +02:00 committed by Copybot
parent 872904d73e
commit f1f6007cbc

View file

@ -50,7 +50,7 @@ function UserNotifications() {
// Temporary workaround to prevent also showing groups/enterprise banner // Temporary workaround to prevent also showing groups/enterprise banner
const [showWritefull, setShowWritefull] = useState(() => { const [showWritefull, setShowWritefull] = useState(() => {
if (isChromium()) { if (isChromium() && !showBackToSchoolModal) {
const show = const show =
getMeta('ol-showWritefullPromoBanner') && getMeta('ol-showWritefullPromoBanner') &&
!customLocalStorage.getItem('has_dismissed_writefull_promo_banner') !customLocalStorage.getItem('has_dismissed_writefull_promo_banner')
@ -93,17 +93,14 @@ function UserNotifications() {
splitTestName={inrGeoBannerSplitTestName} splitTestName={inrGeoBannerSplitTestName}
/> />
) : null} ) : null}
{showBackToSchoolModal ? ( {showBackToSchoolModal && <BackToSchoolModal />}
<BackToSchoolModal /> <WritefullPromoBanner
) : ( show={showWritefull}
<WritefullPromoBanner setShow={setShowWritefull}
show={showWritefull} onDismiss={() => {
setShow={setShowWritefull} setDismissedWritefull(true)
onDismiss={() => { }}
setDismissedWritefull(true) />
}}
/>
)}
</ul> </ul>
</div> </div>
) )