18 lines
371 B
JavaScript
18 lines
371 B
JavaScript
import { TYPE_APP_THEME } from '../types';
|
|
|
|
const initialState = {
|
|
theme: undefined
|
|
};
|
|
|
|
export function appThemeReducer(state = initialState, action) {
|
|
switch (action.type) {
|
|
case TYPE_APP_THEME: {
|
|
return Object.assign({}, state, {
|
|
theme: action.value
|
|
});
|
|
}
|
|
default:
|
|
return state;
|
|
}
|
|
}
|