diff --git a/client/src/components/Filters/DnsBlocklist.js b/client/src/components/Filters/DnsBlocklist.js index 05418d1c..4059b48f 100644 --- a/client/src/components/Filters/DnsBlocklist.js +++ b/client/src/components/Filters/DnsBlocklist.js @@ -23,7 +23,7 @@ class DnsBlocklist extends Component { } handleSubmit = (values, _, { initialValues }) => { - const { filtering: { modalFilterUrl, modalType } } = this.props; + const { modalFilterUrl, modalType } = this.props.filtering; switch (modalType) { case MODAL_TYPE.EDIT_FILTERS: diff --git a/client/src/components/Filters/Form.js b/client/src/components/Filters/Form.js index a994c1ec..9b2787d2 100644 --- a/client/src/components/Filters/Form.js +++ b/client/src/components/Filters/Form.js @@ -8,6 +8,8 @@ import { validatePath, validateRequiredValue } from '../../helpers/validators'; import { renderCheckboxField, renderInputField } from '../../helpers/form'; import { MODAL_OPEN_TIMEOUT, MODAL_TYPE, FORM_NAME } from '../../helpers/constants'; +const filtersCatalog = require('../../helpers/filters/filters.json'); + const getIconsData = (homepage, source) => ([ { iconName: 'dashboard', @@ -82,7 +84,6 @@ const Form = (props) => { modalType, toggleFilteringModal, selectedSources, - filtersCatalog, } = props; const openModal = (modalType, timeout = MODAL_OPEN_TIMEOUT) => { @@ -168,7 +169,6 @@ Form.propTypes = { whitelist: PropTypes.bool, modalType: PropTypes.string.isRequired, toggleFilteringModal: PropTypes.func.isRequired, - filtersCatalog: PropTypes.object, selectedSources: PropTypes.object, }; diff --git a/client/src/components/Filters/Modal.js b/client/src/components/Filters/Modal.js index 0421f548..aba53b30 100644 --- a/client/src/components/Filters/Modal.js +++ b/client/src/components/Filters/Modal.js @@ -78,6 +78,7 @@ class Modal extends Component { break; } default: + break; } const title = t(getTitle(modalType, whitelist)); @@ -99,7 +100,6 @@ class Modal extends Component {