Skip to content

Commit

Permalink
Add StoreNoticesProvider wrapper back to frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Aug 2, 2022
1 parent ee218ac commit 22c95fe
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions assets/js/blocks/products/all-products/frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* External dependencies
*/
import { StoreNoticesProvider } from '@woocommerce/base-context';
import { renderFrontend } from '@woocommerce/base-utils';

/**
* Internal dependencies
Expand All @@ -15,22 +14,12 @@ import { registerBlockType } from '../../../base/utils/bhe-frontend';
*
* @param {*} props
*/
// const AllProductsFrontend = ( props ) => {
// return (
// <StoreNoticesProvider context="wc/all-products">
// <Block { ...props } />
// </StoreNoticesProvider>
// );
// };
const AllProductsFrontend = ( props ) => {
return (
<StoreNoticesProvider context="wc/all-products">
<Block { ...props } />
</StoreNoticesProvider>
);
};

// const getProps = ( el ) => ( {
// attributes: JSON.parse( el.dataset.attributes ),
// } );

// renderFrontend( {
// selector: '.wp-block-woocommerce-all-products',
// Block: AllProductsFrontend,
// getProps,
// } );

registerBlockType( 'woocommerce/all-products', Block );
registerBlockType( 'woocommerce/all-products', AllProductsFrontend );

0 comments on commit 22c95fe

Please sign in to comment.