mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-10-18 21:01:28 +08:00

* fix: fav icon is fixed and bootstrap is removed * fix: return type is updated for the global time reducer * fix: theme.css is replaced with .min.css * update: useThemeSwitcher is removed from the graph component and value is grabed from the reducer * update: instrumentation page is updated * update: react-css-theme-switcher package is removed * update: darkMode is updated * fix: Sider component is updated
26 lines
457 B
TypeScript
26 lines
457 B
TypeScript
import { AppAction, SWITCH_DARK_MODE } from 'types/actions/app';
|
|
import InitialValueTypes from 'types/reducer/app';
|
|
|
|
const InitialValue: InitialValueTypes = {
|
|
isDarkMode: true,
|
|
};
|
|
|
|
const appReducer = (
|
|
state = InitialValue,
|
|
action: AppAction,
|
|
): InitialValueTypes => {
|
|
switch (action.type) {
|
|
case SWITCH_DARK_MODE: {
|
|
return {
|
|
...state,
|
|
isDarkMode: !state.isDarkMode,
|
|
};
|
|
}
|
|
|
|
default:
|
|
return state;
|
|
}
|
|
};
|
|
|
|
export default appReducer;
|