mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 07:24:51 +00:00
26 lines
353 B
TypeScript
26 lines
353 B
TypeScript
'use client';
|
|
|
|
import { useCountUp } from 'use-count-up';
|
|
|
|
const CountUp = ({
|
|
start,
|
|
end,
|
|
duration = 1,
|
|
}: {
|
|
start: number;
|
|
end: number;
|
|
duration?: number;
|
|
}) => {
|
|
const { value } = useCountUp({
|
|
isCounting: true,
|
|
end,
|
|
start,
|
|
duration,
|
|
decimalPlaces: 1,
|
|
});
|
|
|
|
return <span>{value}</span>;
|
|
};
|
|
|
|
export default CountUp;
|