import React from 'react'; import { FormattedNumber } from 'react-intl'; import { Link } from 'react-router-dom'; import { Text } from 'soapbox/components/ui'; import { isNumber } from 'soapbox/utils/numbers'; interface IDashCounter { count: number | undefined label: React.ReactNode to?: string percent?: boolean } /** Displays a (potentially clickable) dashboard statistic. */ const DashCounter: React.FC = ({ count, label, to = '#', percent = false }) => { if (!isNumber(count)) { return null; } return ( {label} ); }; interface IDashCounters { children: React.ReactNode } /** Wrapper container for dash counters. */ const DashCounters: React.FC = ({ children }) => { return (
{children}
); }; export { DashCounter, DashCounters, };