I changed the code but it's still not working.
useEffect(() => {
ScrollTrigger.saveStyles(refMenu.current)
ScrollTrigger.matchMedia({
'(min-width: 768px)': function () {
gsap.fromTo(
refMenu.current.querySelector('.brand-logo'),
{ y: '120px' },
{
y: '0',
scrollTrigger: {
trigger: refMenu.current,
start: 'top+=126px top+=126px',
end: 'bottom+=126px ',
scrub: true,
markers: true,
id: 'nav-scroll',
},
}
)
},
})
}, [])
I have some screenshots, not sure if these helps.
If you have any hints what might be the issue, let me know i'll explore more into it. Sorry if these are not that helpful.