import { numToSI } from "@utils/helpers"; import { Link } from "inferno-router"; import { CommunityAggregates, CommunityId, SiteAggregates, } from "lemmy-js-client"; import { i18n } from "../../i18next"; interface BadgesProps { counts: CommunityAggregates | SiteAggregates; communityId?: CommunityId; } const isCommunityAggregates = ( counts: CommunityAggregates | SiteAggregates ): counts is CommunityAggregates => { return "subscribers" in counts; }; const isSiteAggregates = ( counts: CommunityAggregates | SiteAggregates ): counts is SiteAggregates => { return "communities" in counts; }; export const Badges = ({ counts, communityId }: BadgesProps) => { return ( ); };