mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2026-08-04 03:40:45 +08:00
22 lines
507 B
JavaScript
22 lines
507 B
JavaScript
import { useDispatch, useSelect } from '@wordpress/data';
|
|
import { store as noticesStore } from '@wordpress/notices';
|
|
import { SnackbarList } from '@wordpress/components';
|
|
|
|
const Notifications = () => {
|
|
const notices = useSelect(
|
|
( select ) => select( noticesStore ).getNotices(),
|
|
[]
|
|
);
|
|
|
|
const { removeNotice } = useDispatch( noticesStore );
|
|
|
|
return (
|
|
<SnackbarList
|
|
className="ppcp-r-notifications"
|
|
notices={ notices }
|
|
onRemove={ removeNotice }
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default Notifications;
|