()
| 57 | }; |
| 58 | |
| 59 | const createTimeline = () => { |
| 60 | const navEl = navRef.current; |
| 61 | if (!navEl) return null; |
| 62 | |
| 63 | gsap.set(navEl, { height: 60, overflow: 'hidden' }); |
| 64 | gsap.set(cardsRef.current, { y: 50, opacity: 0 }); |
| 65 | |
| 66 | const tl = gsap.timeline({ paused: true }); |
| 67 | |
| 68 | tl.to(navEl, { |
| 69 | height: calculateHeight, |
| 70 | duration: 0.4, |
| 71 | ease |
| 72 | }); |
| 73 | |
| 74 | tl.to(cardsRef.current, { y: 0, opacity: 1, duration: 0.4, ease, stagger: 0.08 }, '-=0.1'); |
| 75 | |
| 76 | return tl; |
| 77 | }; |
| 78 | |
| 79 | useLayoutEffect(() => { |
| 80 | const tl = createTimeline(); |
no outgoing calls
no test coverage detected