build
Some checks failed
Build & Deploy / deploy (push) Failing after 3m39s

This commit is contained in:
2026-01-19 20:46:39 +01:00
parent 6adf97a096
commit 6e34392976
10 changed files with 77 additions and 9 deletions

View File

@@ -25,13 +25,14 @@ export default function Reveal({ children, className, threshold = 0.1, delay = 0
{ threshold }
);
if (ref.current) {
observer.observe(ref.current);
const currentRef = ref.current;
if (currentRef) {
observer.observe(currentRef);
}
return () => {
if (ref.current) {
observer.unobserve(ref.current);
if (currentRef) {
observer.unobserve(currentRef);
}
};
}, [threshold]);