Server IP : 104.21.14.103 / Your IP : 3.144.9.172 Web Server : LiteSpeed System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : giankuin ( 1871) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/giankuin/thietke365.net/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/data/store-notices/ |
Upload File : |
/** * External dependencies */ import type { Reducer } from 'redux'; /** * Internal dependencies */ import { defaultStoreNoticesState, StoreNoticesState } from './default-state'; import { ACTION_TYPES } from './action-types'; const reducer: Reducer< StoreNoticesState > = ( state = defaultStoreNoticesState, action ) => { switch ( action.type ) { case ACTION_TYPES.REGISTER_CONTAINER: return { ...state, containers: [ ...state.containers, action.containerContext ], }; case ACTION_TYPES.UNREGISTER_CONTAINER: const newContainers = state.containers.filter( ( container ) => container !== action.containerContext ); return { ...state, containers: newContainers, }; } return state; }; export default reducer;