update useSmoothCount syntax

This commit is contained in:
cnrad committed 2022-04-16 17:15:55 -04:00
1 parent 92f76139ca
commit 0551bff539
3 files changed
+6 -46

No files matched your search

+1 -1
View File
@@ -10,7 +10,7 @@ export default function Home({ userCount }: { userCount: number }) {
const [copyState, setCopyState] = useState("Copy");
const countRef = useRef<HTMLSpanElement | null>(null);
const counter = useSmoothCount(countRef, userCount, 3, { curve: [0, 1, 0, 1] });
const counter = useSmoothCount({ ref: countRef, target: userCount, duration: 3, curve: [0, 1, 0, 1] });
const copy = () => {
navigator.clipboard.writeText(