Tracks: Change isEmbedded prop to is_embedded (https://github.com/woocommerce/woocommerce-admin/pull/4533)

This commit is contained in:
Timmy Crawford 2020-06-10 10:06:13 -07:00 committed by GitHub
parent 8a2750c973
commit 1fb8c3caad
1 changed files with 8 additions and 3 deletions

View File

@ -80,7 +80,7 @@ class _Layout extends Component {
if ( isEmbedded ) { if ( isEmbedded ) {
const path = document.location.pathname + document.location.search; const path = document.location.pathname + document.location.search;
recordPageView( path, { isEmbedded } ); recordPageView( path, { is_embedded: true } );
return; return;
} }
@ -193,7 +193,11 @@ class _PageLayout extends Component {
path={ page.path } path={ page.path }
exact exact
render={ ( props ) => ( render={ ( props ) => (
<Layout page={ page } homepageEnabled={ homepageEnabled } { ...props } /> <Layout
page={ page }
homepageEnabled={ homepageEnabled }
{ ...props }
/>
) } ) }
/> />
); );
@ -212,7 +216,8 @@ export const PageLayout = compose(
const options = getOptions( [ 'woocommerce_homescreen_enabled' ] ); const options = getOptions( [ 'woocommerce_homescreen_enabled' ] );
const homepageEnabled = const homepageEnabled =
window.wcAdminFeatures.homepage && window.wcAdminFeatures.homepage &&
get( options, [ 'woocommerce_homescreen_enabled' ], false ) === 'yes'; get( options, [ 'woocommerce_homescreen_enabled' ], false ) ===
'yes';
return { homepageEnabled }; return { homepageEnabled };
} ) } )
)( _PageLayout ); )( _PageLayout );