how fix this framer-motion bug?

<main className="absolute inset-0 -z-10 min-h-screen text-center laptop:text-start">
<AnimatePresence>
{mainText.isOpen &&
<motion.div className="absolute top-1/2 w-full"
animate={{ x: [-600, 0] }}
exit={{ x: -600 }}>
<Content/>
</motion.div>}
</AnimatePresence>

<AnimatePresence>
{slider3D.isOpen &&
<motion.div className="absolute bottom-0"
animate={{ x: [600, 0] }}
exit={{ x: 600 }}>
<Slider3D className="bg-secondary
flex flex-col justify-center mt-auto"
label="Top sales" labelClassName="font-bold" array={topSales} />
</motion.div>}
</AnimatePresence>
</main>
<main className="absolute inset-0 -z-10 min-h-screen text-center laptop:text-start">
<AnimatePresence>
{mainText.isOpen &&
<motion.div className="absolute top-1/2 w-full"
animate={{ x: [-600, 0] }}
exit={{ x: -600 }}>
<Content/>
</motion.div>}
</AnimatePresence>

<AnimatePresence>
{slider3D.isOpen &&
<motion.div className="absolute bottom-0"
animate={{ x: [600, 0] }}
exit={{ x: 600 }}>
<Slider3D className="bg-secondary
flex flex-col justify-center mt-auto"
label="Top sales" labelClassName="font-bold" array={topSales} />
</motion.div>}
</AnimatePresence>
</main>
Function
function showHamburgerMenu() {
mainText.onClose()
slider3D.onClose()
setHamburgerMenu(true)
}
function showHamburgerMenu() {
mainText.onClose()
slider3D.onClose()
setHamburgerMenu(true)
}
1 Reply
Nikita
Nikita16mo ago
relative overlow-hidden for <main>
Want results from more Discord servers?
Add your server