- client: 2159 Fix general settings link to filters
Close #2159
Squashed commit of the following:
commit 5b6b15b43cafd0cbae908b7bf6f0a571add85f51
Merge: b97f6b3f 20226edb
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Mon Oct 12 17:52:56 2020 +0300
Merge branch 'master' into fix/2159
commit b97f6b3f265c4ec8d55e60ef52c316b510e19aa0
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Thu Oct 8 16:35:16 2020 +0300
Update CheckboxField props
commit 8c4545fc554749d7aaa836cc496b2026073dfc39
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Thu Oct 8 16:27:17 2020 +0300
- client: 2159 Fix general settings link to filters
This commit is contained in:
@@ -5,7 +5,11 @@ import { Trans, withTranslation } from 'react-i18next';
|
||||
import flow from 'lodash/flow';
|
||||
|
||||
import { CheckboxField, toNumber } from '../../../helpers/form';
|
||||
import { FILTERS_INTERVALS_HOURS, FORM_NAME } from '../../../helpers/constants';
|
||||
import {
|
||||
FILTERS_INTERVALS_HOURS,
|
||||
FILTERS_LINK,
|
||||
FORM_NAME,
|
||||
} from '../../../helpers/constants';
|
||||
|
||||
const getTitleForInterval = (interval, t) => {
|
||||
if (interval === 0) {
|
||||
@@ -40,6 +44,10 @@ const Form = (props) => {
|
||||
handleSubmit, handleChange, processing, t,
|
||||
} = props;
|
||||
|
||||
const components = {
|
||||
a: <a href={FILTERS_LINK} rel="noopener noreferrer" />,
|
||||
};
|
||||
|
||||
return (
|
||||
<form onSubmit={handleSubmit}>
|
||||
<div className="row">
|
||||
@@ -51,7 +59,9 @@ const Form = (props) => {
|
||||
modifier="checkbox--settings"
|
||||
component={CheckboxField}
|
||||
placeholder={t('block_domain_use_filters_and_hosts')}
|
||||
subtitle={t('filters_block_toggle_hint')}
|
||||
subtitle={<Trans components={components}>
|
||||
filters_block_toggle_hint
|
||||
</Trans>}
|
||||
onChange={handleChange}
|
||||
disabled={processing}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user