diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-04-11 11:06:38 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-04-11 11:06:38 +0700 |
| commit | 3df233e0c23e7d4503931ab6ec8ffc41642ac104 (patch) | |
| tree | ccc032defe422f5fafc4a08af672833b2fe41835 /src/lib/cart/components | |
| parent | 006c77a85786c24199db157d1d70f48b47311d35 (diff) | |
| parent | f0a720441def88187b3913268238c379362fb9d3 (diff) | |
Merge branch 'master' into development_tri/feedback_UAT
Diffstat (limited to 'src/lib/cart/components')
| -rw-r--r-- | src/lib/cart/components/Cart.jsx | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/lib/cart/components/Cart.jsx b/src/lib/cart/components/Cart.jsx index e2173268..d18b1a28 100644 --- a/src/lib/cart/components/Cart.jsx +++ b/src/lib/cart/components/Cart.jsx @@ -28,7 +28,7 @@ const Cart = () => { const [deleteConfirmation, setDeleteConfirmation] = useState(null) - const [productRecomendation, setProductRecomendation] = useState(null); + const [productRecomendation, setProductRecomendation] = useState(null) useEffect(() => { if (cart.data && !products) { @@ -74,13 +74,14 @@ const Cart = () => { useEffect(() => { const LoadProductSImilar = async () => { const randProductIndex = Math.floor(Math.random() * products.length) - const productLoad = await productSearchApi({ query: `q=${products?.[randProductIndex].parent.name}&limit=10` }) - - setProductRecomendation(productLoad); + const productLoad = await productSearchApi({ + query: `q=${products?.[randProductIndex].parent.name}&limit=10` + }) + setProductRecomendation(productLoad) } - if(products?.length > 0) LoadProductSImilar() - },[products]) + if (products?.length > 0) LoadProductSImilar() + }, [products]) const updateQuantity = (value, productId, operation = '') => { let productIndex = products.findIndex((product) => product.id == productId) @@ -424,7 +425,13 @@ const Cart = () => { height={60} /> <div className='text-gray_r-12/90'> - Tanya stock untuk pembelian anda sebelum melanjutkan pembayaran!<span> <a href='https://wa.me/628128080622' className='text-danger-500'>Hubungi Kami</a></span> + Tanya stock untuk pembelian anda sebelum melanjutkan pembayaran! + <span> + {' '} + <a href='https://wa.me/628128080622' className='text-danger-500'> + Hubungi Kami + </a> + </span> </div> </div> </div> @@ -465,7 +472,7 @@ const Cart = () => { </div> <div className='col-span-9 pt-2 pb-6 mt-6'> - <h1 className='text-title-sm font-semibold mb-6'>Product Yang Mungkin Kamu Suka</h1> + <h1 className='text-title-sm font-semibold mb-6'>Product Yang Mungkin Kamu Suka</h1> <div className='grid grid-cols-5 gap-x-3 gap-y-6'> {productRecomendation && productRecomendation.response.products.map((product) => ( @@ -474,7 +481,6 @@ const Cart = () => { </div> </div> </div> - </DesktopView> </> ) |
