()
| 82 | }; |
| 83 | |
| 84 | const createTimeline = () => { |
| 85 | const navEl = navRef.current; |
| 86 | if (!navEl) return null; |
| 87 | |
| 88 | gsap.set(navEl, { height: 60, overflow: 'hidden' }); |
| 89 | gsap.set(cardsRef.current, { y: 50, opacity: 0 }); |
| 90 | |
| 91 | const tl = gsap.timeline({ paused: true }); |
| 92 | |
| 93 | tl.to(navEl, { |
| 94 | height: calculateHeight, |
| 95 | duration: 0.4, |
| 96 | ease |
| 97 | }); |
| 98 | |
| 99 | tl.to(cardsRef.current, { y: 0, opacity: 1, duration: 0.4, ease, stagger: 0.08 }, '-=0.1'); |
| 100 | |
| 101 | return tl; |
| 102 | }; |
| 103 | |
| 104 | useLayoutEffect(() => { |
| 105 | const tl = createTimeline(); |
no outgoing calls
no test coverage detected