22 lines
499 B
JavaScript
22 lines
499 B
JavaScript
|
/**
|
||
|
* External dependencies
|
||
|
*/
|
||
|
import { SnackbarList } from 'wordpress-components';
|
||
|
import { useStoreNotices } from '@woocommerce/base-hooks';
|
||
|
|
||
|
const NoticesContainer = () => {
|
||
|
const { notices, removeNotice } = useStoreNotices();
|
||
|
const snackbarNotices = notices.filter(
|
||
|
( notice ) => notice.type === 'snackbar'
|
||
|
);
|
||
|
return (
|
||
|
<SnackbarList
|
||
|
notices={ snackbarNotices }
|
||
|
className={ 'wc-block-notices__snackbar' }
|
||
|
onRemove={ removeNotice }
|
||
|
/>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default NoticesContainer;
|