Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
primogenial
/
languages
/
wp-content-20241001222009
/
plugins
/
jetpack
/
jetpack_vendor
/
automattic
/
jetpack-wordads
/
src
/
dashboard
/
components
/
global-notices
/
store
:
reducer.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
import { CREATE_NOTICE, REMOVE_NOTICE } from './actions'; const notices = ( state = { notices: [] }, action ) => { switch ( action.type ) { case CREATE_NOTICE: return { ...state, notices: [ ...state.notices, action.notice ], }; case REMOVE_NOTICE: return { ...state, notices: state.notices.filter( notice => notice.id !== action.notice.id ), }; } return state; }; export default notices;