diff --git a/src/actions/index.js b/src/actions/index.js index 8ee00c0..8530bb8 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -171,19 +171,20 @@ export function updateDistrict (district) { } } -export const UPDATE_TAGFILTERS = 'UPDATE_TAGFILTERS' -export function updateTagFilters (tag) { +export const CLEAR_FILTER = 'CLEAR_FILTER' +export function clearFilter (filter) { return { - type: UPDATE_TAGFILTERS, - tag + type: CLEAR_FILTER, + filter } } -export const UPDATE_CATEGORYFILTERS = 'UPDATE_CATEGORYFILTERS' -export function updateCategoryFilters (category) { +export const TOGGLE_FILTER = 'TOGGLE_FILTER' +export function toggleFilter (filter, value) { return { - type: UPDATE_CATEGORYFILTERS, - category + type: TOGGLE_FILTER, + filter, + value } } @@ -217,13 +218,6 @@ export function decrementNarrativeCurrent () { } } -export const RESET_ALLFILTERS = 'RESET_ALLFILTERS' -export function resetAllFilters () { - return { - type: RESET_ALLFILTERS - } -} - export const UPDATE_SOURCE = 'UPDATE_SOURCE' export function updateSource (source) { return { diff --git a/src/components/CategoriesListPanel.jsx b/src/components/CategoriesListPanel.jsx deleted file mode 100644 index a295aa0..0000000 --- a/src/components/CategoriesListPanel.jsx +++ /dev/null @@ -1,38 +0,0 @@ -import React from 'react' -import Checkbox from './presentational/Checkbox' -import copy from '../js/data/copy.json' - -export default (props) => { - function onClickCheckbox (obj, type) { - obj.active = !obj.active - props.onCategoryFilter(obj) - } - - function renderCategoryTree () { - return ( -
{copy[props.language].toolbar.explore_by_category__description}
- {renderCategoryTree()} -{copy[this.props.language].toolbar.explore_by_tag__description}
- {this.renderTree()} -{copy[language].toolbar.explore_by_category__description}
+ {renderCategoryTree()} +{copy[language].toolbar.explore_by_tag__description}
+ {renderTree()} +