+ client: functional components for dashboard

This commit is contained in:
Ildar Kamalov
2019-08-27 16:43:58 +03:00
parent 75df5e8292
commit 6bce41bb0a
14 changed files with 310 additions and 370 deletions

View File

@@ -5,13 +5,13 @@ import { Trans, withNamespaces } from 'react-i18next';
import flow from 'lodash/flow';
import { renderRadioField, toNumber } from '../../../helpers/form';
import { STATS_INTERVALS } from '../../../helpers/constants';
import { STATS_INTERVALS_DAYS } from '../../../helpers/constants';
const getIntervalFields = (processing, t, handleChange, toNumber) =>
STATS_INTERVALS.map((interval) => {
STATS_INTERVALS_DAYS.map((interval) => {
const title = interval === 1
? t('interval_24_hour')
: t('interval_days', { value: interval });
: t('interval_days', { count: interval });
return (
<Field