This commit is contained in:
Your Name committed 2026-06-12 22:49:47 -04:00
1 parent 90915762c3
commit 36f8ff0759
1 file changed
+11
+11
View File
@@ -10,6 +10,17 @@ export default function CartDrawer() {
const { t } = useTranslation()
const { isCartOpen, toggleCart, items, updateQuantity, removeFromCart, getCartTotal } = useCartStore()
React.useEffect(() => {
if (isCartOpen) {
document.body.style.overflow = 'hidden'
} else {
document.body.style.overflow = ''
}
return () => {
document.body.style.overflow = ''
}
}, [isCartOpen])
if (!isCartOpen) return null
return (