fix bug cart
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
'use client'
|
||||
|
||||
import { useProductStore } from "@/app/product/store/Store";
|
||||
import { usePathname } from "next/navigation";
|
||||
import { useEffect } from "react";
|
||||
|
||||
const ManageData = () => {
|
||||
|
||||
const { setVariantId } = useProductStore()
|
||||
const pathname = usePathname()
|
||||
|
||||
useEffect(() => {
|
||||
setVariantId('')
|
||||
}, [pathname]);
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
export default ManageData
|
||||
Reference in New Issue
Block a user