MCPcopy Create free account
hub / github.com/dailydotdev/apps / Item

Function Item

packages/shared/src/components/profile/UserStats.tsx:23–37  ·  view source on GitHub ↗
({
  stat,
  ...props
}: {
  stat: { title: string; amount: number };
  onClick?: () => void;
  className?: string;
})

Source from the content-addressed store, hash-verified

21
22const ItemWrapper = classed('div', 'flex items-center gap-1');
23const Item = ({
24 stat,
25 ...props
26}: {
27 stat: { title: string; amount: number };
28 onClick?: () => void;
29 className?: string;
30}) => (
31 <ItemWrapper {...props} data-testid={stat?.title}>
32 <b className="text-text-primary typo-subhead">
33 {largeNumberFormat(stat?.amount || 0)}
34 </b>
35 <span className="capitalize">{stat?.title}</span>
36 </ItemWrapper>
37);
38
39export function UserStats({ stats, userId }: UserStatsProps): ReactElement {
40 const { openModal } = useLazyModal<

Callers

nothing calls this directly

Calls 1

largeNumberFormatFunction · 0.90

Tested by

no test coverage detected