Skip to content

Commit

Permalink
Hosting onboarding: hide masterbar (Automattic#78863)
Browse files Browse the repository at this point in the history
  • Loading branch information
zaguiini authored Jun 30, 2023
1 parent 028936f commit 5643b82
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/sites-dashboard/controller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import AsyncLoad from 'calypso/components/async-load';
import PageViewTracker from 'calypso/lib/analytics/page-view-tracker';
import { getCurrentUser } from 'calypso/state/current-user/selectors';
import { removeNotice } from 'calypso/state/notices/actions';
import { hideMasterbar } from 'calypso/state/ui/actions';
import { EmptySitesDashboard } from './components/empty-sites-dashboard';
import { SitesDashboard } from './components/sites-dashboard';
import { MEDIA_QUERIES } from './utils';
Expand Down Expand Up @@ -49,6 +50,7 @@ export function maybeSitesDashboard( context: PageJSContext, next: () => void )
const siteCount = getCurrentUser( context.store.getState() )?.site_count ?? 0;

if ( context.query[ 'hosting-flow' ] || siteCount === 0 ) {
context.store.dispatch( hideMasterbar() );
return emptySites( context, siteCount, next );
}

Expand Down

0 comments on commit 5643b82

Please sign in to comment.