Skip to content

Commit

Permalink
improve onboarding detection in whats new module
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Jul 12, 2023
1 parent 204eb01 commit 3810fd1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions code/lib/manager-api/src/modules/whatsnew.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3810fd1

Please sign in to comment.