blob: 2131228aa4037f4e15796d744677ba700347887f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
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;
}
}
|