import React from 'react'; import { numberWithCommas } from 'App/utils'; import { useTranslation } from 'react-i18next'; function TooltipLabel({ payload, unit = false }) { const { t } = useTranslation(); if (!payload) return ''; const value = numberWithCommas(Math.round(payload.value)); return (
{`${payload.name}: ${value}`} {unit && {t('ms')}}
); } function CustomTooltip({ active, payload, label, unit }) { if (active && payload && payload[0]) { return (
{`${label}`}
{payload.map((p) => ( ))}
); } return null; } export default CustomTooltip;