import React from 'react'; import Icon from 'soapbox/components/icon'; import { shortNumberFormat } from 'soapbox/utils/numbers'; interface IIconWithCounter extends React.HTMLAttributes { count: number, icon?: string; src?: string; } const IconWithCounter: React.FC = ({ icon, count, ...rest }) => { return (
{count > 0 && {shortNumberFormat(count)} }
); }; export default IconWithCounter;