Skip to content

Commit

Permalink
Avoid black bar blinking on migrations (#98889)
Browse files Browse the repository at this point in the history
* Add '/setup' to site shouldShowSiteDashboard routes.

* Add '/setup' also to shouldShowSitesDashboard.

* Include '/start' on the urls array.
  • Loading branch information
andregardi authored Jan 24, 2025
1 parent 00535d3 commit d50cf2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/state/global-sidebar/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ function isInRoute( state: AppState, routes: string[] ) {
}

function shouldShowSitesDashboard( state: AppState ) {
return isInRoute( state, [ '/sites', '/p2s', ...SITE_DASHBOARD_ROUTES ] );
return isInRoute( state, [ '/sites', '/p2s', '/setup', '/start', ...SITE_DASHBOARD_ROUTES ] );
}

export function shouldShowSiteDashboard( state: AppState, siteId: number | null ) {
return !! siteId && isInRoute( state, SITE_DASHBOARD_ROUTES );
return !! siteId && isInRoute( state, [ '/setup', '/start', ...SITE_DASHBOARD_ROUTES ] );
}

export const getShouldShowGlobalSidebar = (
Expand Down

0 comments on commit d50cf2e

Please sign in to comment.