Remove all traces of Notification Context
This commit is contained in:
parent
1d78f097cb
commit
ef1dc66068
|
@ -13,10 +13,7 @@ import { CURRENT_USER_IS_ADMIN } from '@woocommerce/settings';
|
|||
import BlockErrorBoundary from '@woocommerce/base-components/block-error-boundary';
|
||||
import { translateJQueryEventToNative } from '@woocommerce/base-utils';
|
||||
import withScrollToTop from '@woocommerce/base-hocs/with-scroll-to-top';
|
||||
import {
|
||||
StoreNoticesProvider,
|
||||
CartProvider,
|
||||
} from '@woocommerce/base-context/providers';
|
||||
import { CartProvider } from '@woocommerce/base-context/providers';
|
||||
import { SlotFillProvider } from '@woocommerce/blocks-checkout';
|
||||
|
||||
/**
|
||||
|
@ -87,7 +84,6 @@ const Block = ( { attributes, children, scrollToTop } ) => (
|
|||
showErrorMessage={ CURRENT_USER_IS_ADMIN }
|
||||
>
|
||||
<SnackbarNoticesContainer context="wc/cart" />
|
||||
<StoreNoticesProvider>
|
||||
<StoreNoticesContainer context="wc/cart" />
|
||||
<SlotFillProvider>
|
||||
<CartProvider>
|
||||
|
@ -95,7 +91,6 @@ const Block = ( { attributes, children, scrollToTop } ) => (
|
|||
<ScrollOnError scrollToTop={ scrollToTop } />
|
||||
</CartProvider>
|
||||
</SlotFillProvider>
|
||||
</StoreNoticesProvider>
|
||||
</BlockErrorBoundary>
|
||||
);
|
||||
export default withScrollToTop( Block );
|
||||
|
|
|
@ -31,7 +31,6 @@ import { LOGIN_TO_CHECKOUT_URL, isLoginRequired, reloadPage } from './utils';
|
|||
import type { Attributes } from './types';
|
||||
import { CheckoutBlockContext } from './context';
|
||||
import { hasNoticesOfType } from '../../utils/notices';
|
||||
import { StoreNoticesProvider } from '../../base/context/providers';
|
||||
|
||||
const LoginPrompt = () => {
|
||||
return (
|
||||
|
@ -185,7 +184,6 @@ const Block = ( {
|
|||
showErrorMessage={ CURRENT_USER_IS_ADMIN }
|
||||
>
|
||||
<SnackbarNoticesContainer context="wc/checkout" />
|
||||
<StoreNoticesProvider>
|
||||
<StoreNoticesContainer context="wc/checkout" />
|
||||
{ /* SlotFillProvider need to be defined before CheckoutProvider so fills have the SlotFill context ready when they mount. */ }
|
||||
<SlotFillProvider>
|
||||
|
@ -202,7 +200,6 @@ const Block = ( {
|
|||
</SidebarLayout>
|
||||
</CheckoutProvider>
|
||||
</SlotFillProvider>
|
||||
</StoreNoticesProvider>
|
||||
</BlockErrorBoundary>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -6,10 +6,7 @@ import PropTypes from 'prop-types';
|
|||
import { ProductListContainer } from '@woocommerce/base-components/product-list';
|
||||
import { InnerBlockLayoutContextProvider } from '@woocommerce/shared-context';
|
||||
import { gridBlockPreview } from '@woocommerce/resource-previews';
|
||||
import {
|
||||
StoreNoticesProvider,
|
||||
StoreNoticesContainer,
|
||||
} from '@woocommerce/base-context';
|
||||
import { StoreNoticesContainer } from '@woocommerce/base-context';
|
||||
|
||||
/**
|
||||
* The All Products Block.
|
||||
|
@ -40,9 +37,7 @@ class Block extends Component {
|
|||
parentName="woocommerce/all-products"
|
||||
parentClassName="wc-block-grid"
|
||||
>
|
||||
<StoreNoticesProvider>
|
||||
<StoreNoticesContainer context={ 'wc/all-products' } />
|
||||
</StoreNoticesProvider>
|
||||
<ProductListContainer
|
||||
attributes={ attributes }
|
||||
urlParameterSuffix={ urlParameterSuffix }
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { StoreNoticesProvider } from '@woocommerce/base-context';
|
||||
import { renderFrontend } from '@woocommerce/base-utils';
|
||||
|
||||
/**
|
||||
|
@ -15,11 +14,7 @@ import Block from './block';
|
|||
* @param {*} props
|
||||
*/
|
||||
const AllProductsFrontend = ( props ) => {
|
||||
return (
|
||||
<StoreNoticesProvider context="wc/all-products">
|
||||
<Block { ...props } />
|
||||
</StoreNoticesProvider>
|
||||
);
|
||||
return <Block { ...props } />;
|
||||
};
|
||||
|
||||
const getProps = ( el ) => ( {
|
||||
|
|
|
@ -7,10 +7,7 @@ import {
|
|||
InnerBlockLayoutContextProvider,
|
||||
ProductDataContextProvider,
|
||||
} from '@woocommerce/shared-context';
|
||||
import {
|
||||
StoreNoticesProvider,
|
||||
StoreNoticesContainer,
|
||||
} from '@woocommerce/base-context';
|
||||
import { StoreNoticesContainer } from '@woocommerce/base-context';
|
||||
import { useStoreEvents } from '@woocommerce/base-context/hooks';
|
||||
|
||||
/**
|
||||
|
@ -49,9 +46,7 @@ const Block = ( { isLoading, product, children } ) => {
|
|||
product={ product }
|
||||
isLoading={ isLoading }
|
||||
>
|
||||
<StoreNoticesProvider>
|
||||
<StoreNoticesContainer context={ noticeContext } />
|
||||
</StoreNoticesProvider>
|
||||
<div className={ className }>{ children }</div>
|
||||
</ProductDataContextProvider>
|
||||
</InnerBlockLayoutContextProvider>
|
||||
|
|
Loading…
Reference in New Issue