import React from 'react'; import { Link } from 'react-router-dom'; import { withTranslation, Trans } from 'react-i18next'; import StatsCard from './StatsCard'; import { getPercent, normalizeHistory } from '../../helpers/helpers'; import { RESPONSE_FILTER } from '../../helpers/constants'; const getNormalizedHistory = (data: any, interval: any, id: any) => [{ data: normalizeHistory(data), id }]; interface StatisticsProps { interval: number; dnsQueries: number[]; blockedFiltering: unknown[]; replacedSafebrowsing: unknown[]; replacedParental: unknown[]; numDnsQueries: number; numBlockedFiltering: number; numReplacedSafebrowsing: number; numReplacedParental: number; refreshButton: React.ReactNode; } const Statistics = ({ interval, dnsQueries, blockedFiltering, replacedSafebrowsing, replacedParental, numDnsQueries, numBlockedFiltering, numReplacedSafebrowsing, numReplacedParental, }: StatisticsProps) => (
dns_query } color="blue" />
link , ]}> blocked_by } color="red" />
stats_malware_phishing } color="green" />
stats_adult } color="yellow" />
); export default withTranslation()(Statistics);