-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create a selector to reuse across components
- Loading branch information
Showing
3 changed files
with
28 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import config from '@automattic/calypso-config'; | ||
|
||
/** | ||
* Determines if the launchpad should be shown first based on site createion flow | ||
* @param {string|undefined} siteCreationFlow Site creation flow | ||
* @returns {boolean} Whether launchpad should be shown first | ||
*/ | ||
export const shouldShowLaunchpadFirst = ( siteCreationFlow ) => { | ||
const wasSiteCreatedOnboardingFlow = siteCreationFlow === 'onboarding'; | ||
const isLaunchpadFirstEnabled = config.isEnabled( 'home/launchpad-first' ); | ||
|
||
return wasSiteCreatedOnboardingFlow && isLaunchpadFirstEnabled; | ||
}; | ||
|
||
export default shouldShowLaunchpadFirst; |