From e76ca380f733b515c31297a285d8bea44e074a1b Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Fri, 10 May 2019 22:27:20 +0900 Subject: Make addon-enabled as a clean architecture --- src/content/reducers/addon.ts | 22 ---------------------- src/content/reducers/index.ts | 4 +--- 2 files changed, 1 insertion(+), 25 deletions(-) delete mode 100644 src/content/reducers/addon.ts (limited to 'src/content/reducers') diff --git a/src/content/reducers/addon.ts b/src/content/reducers/addon.ts deleted file mode 100644 index 2131228..0000000 --- a/src/content/reducers/addon.ts +++ /dev/null @@ -1,22 +0,0 @@ -import * as actions from '../actions'; - -export interface State { - enabled: boolean; -} - -const defaultState: State = { - enabled: true, -}; - -export default function reducer( - state: State = defaultState, - action: actions.AddonAction, -): State { - switch (action.type) { - case actions.ADDON_SET_ENABLED: - return { ...state, - enabled: action.enabled, }; - default: - return state; - } -} diff --git a/src/content/reducers/index.ts b/src/content/reducers/index.ts index fb5eb84..6f11512 100644 --- a/src/content/reducers/index.ts +++ b/src/content/reducers/index.ts @@ -1,5 +1,4 @@ import { combineReducers } from 'redux'; -import addon, { State as AddonState } from './addon'; import find, { State as FindState } from './find'; import setting, { State as SettingState } from './setting'; import input, { State as InputState } from './input'; @@ -8,7 +7,6 @@ import followController, { State as FollowControllerState } import mark, { State as MarkState } from './mark'; export interface State { - addon: AddonState; find: FindState; setting: SettingState; input: InputState; @@ -17,5 +15,5 @@ export interface State { } export default combineReducers({ - addon, find, setting, input, followController, mark, + find, setting, input, followController, mark, }); -- cgit v1.2.3