Pull request 1792: 5633-invalid-date

Updates #5633.

Squashed commit of the following:

commit 889bc7acb82472d72d7b3103554e70342513a567
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Mar 30 14:31:42 2023 +0300

    client: fix dashboard date
This commit is contained in:
Ainar Garipov 2023-03-30 14:37:05 +03:00
parent da9008aba3
commit a0349b6c7e
2 changed files with 3 additions and 2 deletions

View File

@ -185,7 +185,7 @@ const Dashboard = ({
</div>
)}
<Statistics
interval={stats.interval}
interval={msToDays(stats.interval)}
dnsQueries={stats.dnsQueries}
blockedFiltering={stats.blockedFiltering}
replacedSafebrowsing={stats.replacedSafebrowsing}

View File

@ -9,11 +9,12 @@ import round from 'lodash/round';
import { useSelector } from 'react-redux';
import PropTypes from 'prop-types';
import './Line.css';
import { msToDays } from '../../helpers/helpers';
const Line = ({
data, color = 'black',
}) => {
const interval = useSelector((state) => state.stats.interval);
const interval = msToDays(useSelector((state) => state.stats.interval));
return <ResponsiveLine
enableArea