Initial commit with 🏗️ Scaffold-ETH 2 @ 1.0.5

This commit is contained in:
han
2026-01-10 18:17:37 +07:00
commit 98751c5b87
165 changed files with 29073 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import { useEffect, useState } from "react";
const ANIMATION_TIME = 2000;
export function useAnimationConfig(data: any) {
const [showAnimation, setShowAnimation] = useState(false);
const [prevData, setPrevData] = useState();
useEffect(() => {
if (prevData !== undefined && prevData !== data) {
setShowAnimation(true);
setTimeout(() => setShowAnimation(false), ANIMATION_TIME);
}
setPrevData(data);
}, [data, prevData]);
return {
showAnimation,
};
}