Files
CHOMPStation2/tgui/packages/tgui_ch/debug/reducer.js
2023-05-23 17:43:01 +02:00

23 lines
424 B
JavaScript

/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
export const debugReducer = (state = {}, action) => {
const { type, payload } = action;
if (type === 'debug/toggleKitchenSink') {
return {
...state,
kitchenSink: !state.kitchenSink,
};
}
if (type === 'debug/toggleDebugLayout') {
return {
...state,
debugLayout: !state.debugLayout,
};
}
return state;
};