"use client"; import { minecrafter } from "@/font/fonts"; import { cn } from "@/app/common/utils"; import CountUp from "react-countup"; import { ReactElement } from "react"; /** * Props for the counter. */ type CounterProps = { /** * The name of the counter. */ name: string; /** * The amount to count up to. */ amount: number; /** * The optional duration of the count up. *
* Uses the default duration if not provided. *
*/ duration?: number | undefined; }; /** * A counter component. * * @param name the name of the counter * @param amount the amount to count up to * @param duration the optional duration of the count up * @returns the counter jsx */ const Counter = ({ name, amount, duration }: CounterProps): ReactElement => (