Initial commit

This commit is contained in:
dk
2025-12-20 00:34:06 +02:00
commit e1c54db437
308 changed files with 64848 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
import { useRef, useEffect } from 'react';
import { gsap } from 'gsap';
export const useMenuAnimation = (menuOpen: boolean) => {
const menuRef = useRef<HTMLDivElement>(null);
useEffect(() => {
if (menuRef.current) {
if (menuOpen) {
gsap.to(menuRef.current, {
y: "0%",
opacity: 1,
pointerEvents: "auto",
duration: 0.8,
ease: "power3.out"
});
} else {
gsap.to(menuRef.current, {
y: "-135%",
opacity: 1,
pointerEvents: "none",
duration: 0.8,
ease: "power3.inOut"
});
}
}
}, [menuOpen]);
useEffect(() => {
if (menuRef.current) {
gsap.set(menuRef.current, {
y: "-135%",
opacity: 1,
pointerEvents: "none"
});
}
}, []);
return menuRef;
};