quintodrome/ui/src/reducers/activityReducer.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
361 B
JavaScript
Raw Normal View History

import { ACTIVITY_SCAN_STATUS_UPD } from '../actions'
export const activityReducer = (
previousState = {
scanStatus: { scanning: false, count: 0 },
},
payload
) => {
const { type, data } = payload
switch (type) {
case ACTIVITY_SCAN_STATUS_UPD:
return { ...previousState, scanStatus: data }
default:
return previousState
}
}