"use client"; import { memo } from "react"; import Shapes from "../../asset/Shapes"; import type { StatViewProps } from "./Stat.types"; /** * Figma: "Card / Stat" (21598-18215). Full width of grid column at desktop. */ function StatView({ value, label, asOf, asOfPrefix, sourceHref, sourceName, shapeVariant, className = "", }: StatViewProps) { const sourcedYear = Boolean(asOfPrefix || sourceHref); return (

{value}

{label}

{asOf ? (

{sourcedYear ? ( <> {asOfPrefix ? {`${asOfPrefix} `} : null} {sourceHref ? ( {asOf} {sourceName ? ( {` (${sourceName})`} ) : null} ) : ( {asOf} )} ) : ( asOf )}

) : null}
); } StatView.displayName = "StatView"; export default memo(StatView);