From 3810fd19f37ea34f0979bbe73db08e103ed249a3 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Wed, 12 Jul 2023 13:06:32 +0200 Subject: [PATCH] improve onboarding detection in whats new module --- code/lib/manager-api/src/modules/whatsnew.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/lib/manager-api/src/modules/whatsnew.ts b/code/lib/manager-api/src/modules/whatsnew.ts index 21d0596683f6..5890eaae6fc7 100644 --- a/code/lib/manager-api/src/modules/whatsnew.ts +++ b/code/lib/manager-api/src/modules/whatsnew.ts @@ -73,10 +73,12 @@ export const init: ModuleFn = ({ fullAPI, store }) => { const whatsNewData = await getLatestWhatsNewPost(); setWhatsNewState(whatsNewData); - const isNewStoryBookUser = fullAPI.getUrlState().path.includes('onboarding'); + const urlState = fullAPI.getUrlState(); + const isOnboardingView = + urlState?.path === '/onboarding' || urlState.queryParams?.onboarding === 'true'; if ( - !isNewStoryBookUser && + !isOnboardingView && whatsNewData.status === 'SUCCESS' && !whatsNewData.disableWhatsNewNotifications && whatsNewData.showNotification