diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-11 11:37:18 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-11 11:37:18 +0900 |
commit | 1ba1660269b24446e9df7df0016de8c3e5596c8f (patch) | |
tree | 545e801e2039e1a49f86c6337a7110a8ed62cad8 /src/content/reducers | |
parent | bacf83a32083c5a4c4a45c061288081423bbf18a (diff) |
Make find as a clean architecture
Diffstat (limited to 'src/content/reducers')
-rw-r--r-- | src/content/reducers/find.ts | 25 | ||||
-rw-r--r-- | src/content/reducers/index.ts | 4 |
2 files changed, 1 insertions, 28 deletions
diff --git a/src/content/reducers/find.ts b/src/content/reducers/find.ts deleted file mode 100644 index 8c3e637..0000000 --- a/src/content/reducers/find.ts +++ /dev/null @@ -1,25 +0,0 @@ -import * as actions from '../actions'; - -export interface State { - keyword: string | null; - found: boolean; -} - -const defaultState: State = { - keyword: null, - found: false, -}; - -export default function reducer( - state: State = defaultState, - action: actions.FindAction, -): State { - switch (action.type) { - case actions.FIND_SET_KEYWORD: - return { ...state, - keyword: action.keyword, - found: action.found, }; - default: - return state; - } -} diff --git a/src/content/reducers/index.ts b/src/content/reducers/index.ts index 21e8918..812a404 100644 --- a/src/content/reducers/index.ts +++ b/src/content/reducers/index.ts @@ -1,17 +1,15 @@ import { combineReducers } from 'redux'; -import find, { State as FindState } from './find'; import input, { State as InputState } from './input'; import followController, { State as FollowControllerState } from './follow-controller'; import mark, { State as MarkState } from './mark'; export interface State { - find: FindState; input: InputState; followController: FollowControllerState; mark: MarkState; } export default combineReducers({ - find, input, followController, mark, + input, followController, mark, }); |