This repository has been archived on 2023-12-22. You can view files and clone it, but cannot push or open issues or pull requests.
old-monorepo/_Dashboard/app/renderer/store/reducers/comConnectionStatusReducer.js

17 lines
358 B
JavaScript

import { SET_CONNECTION_STATUS } from '../actions/actionTypes';
const initialState = false;
export default (state = initialState, { type, payload }) => {
switch (type) {
case SET_CONNECTION_STATUS:
if (typeof payload === 'boolean') {
return payload;
} else {
return state;
}
default:
return state;
}
};