fbi-cde/crime-data-frontend

View on GitHub
src/actions/filters.js

Summary

Maintainability
A
0 mins
Test Coverage
import { FILTER_RESET, FILTERS_UPDATE } from './constants'
import filterValidator from '../util/filter'

export const resetFilter = ({ id }) => ({ type: FILTER_RESET, id })
export const updateFilters = filters => {
  const f = filterValidator({ ...filters })
  return { type: FILTERS_UPDATE, filters: f }
}