From 59b5ca96b42eca6e93506548293d294e12fa2f83 Mon Sep 17 00:00:00 2001 From: Noah Allen Date: Mon, 13 Mar 2023 15:19:01 -0700 Subject: [PATCH] Remove unused data store --- .../editing-toolkit-plugin/whats-new/index.js | 1 - .../whats-new/src/store.js | 31 ------------------- 2 files changed, 32 deletions(-) delete mode 100644 apps/editing-toolkit/editing-toolkit-plugin/whats-new/src/store.js diff --git a/apps/editing-toolkit/editing-toolkit-plugin/whats-new/index.js b/apps/editing-toolkit/editing-toolkit-plugin/whats-new/index.js index 6eb0c454f0933a..533b37e2764093 100644 --- a/apps/editing-toolkit/editing-toolkit-plugin/whats-new/index.js +++ b/apps/editing-toolkit/editing-toolkit-plugin/whats-new/index.js @@ -1,2 +1 @@ import './src/whats-new'; -import './src/store'; diff --git a/apps/editing-toolkit/editing-toolkit-plugin/whats-new/src/store.js b/apps/editing-toolkit/editing-toolkit-plugin/whats-new/src/store.js deleted file mode 100644 index 75783319c3efef..00000000000000 --- a/apps/editing-toolkit/editing-toolkit-plugin/whats-new/src/store.js +++ /dev/null @@ -1,31 +0,0 @@ -import { registerStore } from '@wordpress/data'; - -const DEFAULT_STATE = { - whatsNew: false, -}; - -const actions = { - toggleWhatsNew: () => ( { - type: 'TOGGLE_FEATURE', - } ), -}; - -const selectors = { - isWhatsNewActive: ( state ) => state.whatsNew, -}; - -function reducer( state = DEFAULT_STATE, action ) { - switch ( action.type ) { - case 'TOGGLE_FEATURE': - return { - whatsNew: ! state.whatsNew, - }; - } - return state; -} - -registerStore( 'automattic/whats-new', { - reducer, - actions, - selectors, -} );