diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-06-14 13:22:20 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-06-14 13:22:20 +0700 |
| commit | eb4ae7be05ed97bd02b7f3e9cc56393f435188e2 (patch) | |
| tree | 6518bdd7b1801f492a6c1588ff828a2c8fa70dd2 /src/lib/cart | |
| parent | 702f43a7190d65c2370e7019311cc26c2cc0eafd (diff) | |
layout promotion program di detail product dan layout modal popup
Diffstat (limited to 'src/lib/cart')
| -rw-r--r-- | src/lib/cart/components/Cart.jsx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/cart/components/Cart.jsx b/src/lib/cart/components/Cart.jsx index 907d1267..718541af 100644 --- a/src/lib/cart/components/Cart.jsx +++ b/src/lib/cart/components/Cart.jsx @@ -17,10 +17,16 @@ import DesktopView from '@/core/components/views/DesktopView' import ProductCard from '@/lib/product/components/ProductCard' import productSearchApi from '@/lib/product/api/productSearchApi' import whatsappUrl from '@/core/utils/whatsappUrl' +import useAuth from '@/core/hooks/useAuth' const Cart = () => { const router = useRouter() const [products, setProducts] = useState(null) + const auth = useAuth() + + useEffect(() => { + if (!auth) return + }, [auth]) const { cart } = useCart({ enabled: !products }) const [totalPriceBeforeTax, setTotalPriceBeforeTax] = useState(0) |
