function Stat({ value, suffix, label, desc, decimals = 0 }) {
const [ref, inView] = useInView();
const v = useCounter(value, inView);
return (
{decimals ? v.toFixed(decimals) : Math.round(v)}
{suffix && {suffix}}
{label}
{desc &&
{desc}
}
);
}
function Stats() {
const { t } = useLang();
return (
);
}
window.Stats = Stats;