* change root dit and change way to import modules * update deps to latest versions * use latest tools for building bundles * rewrite webpack config * use nomodule technique for loading modern bundle * inject polyfills by babel usebuiltins * update eslint rules * rename all style files to CSS * use postcss preset env for building styles * proper typescript typing * put all html files to templates folder * etc
15 lines
362 B
TypeScript
15 lines
362 B
TypeScript
import { Theme } from 'common/types';
|
|
import { StaticStore } from 'common/static-store';
|
|
|
|
import { THEME_SET_ACTION, THEME_SET } from './types';
|
|
|
|
export function theme(state: Theme = StaticStore.query.theme, action: THEME_SET_ACTION): Theme {
|
|
switch (action.type) {
|
|
case THEME_SET: {
|
|
return action.theme;
|
|
}
|
|
default:
|
|
return state;
|
|
}
|
|
}
|