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
347 B
JavaScript
Raw Normal View History

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