summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/checkout/components/Checkout.jsx10
-rw-r--r--src/lib/home/components/CategoryDynamic.jsx4
2 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx
index 913bd273..f63ef457 100644
--- a/src/lib/checkout/components/Checkout.jsx
+++ b/src/lib/checkout/components/Checkout.jsx
@@ -410,7 +410,7 @@ const Checkout = () => {
Math.round(parseInt(finalShippingAmt * 1.1) / 1000) * 1000;
const finalGT = GT < 0 ? 0 : GT;
setGrandTotal(finalGT);
- }, [biayaKirim, cartCheckout?.grandTotal, activeVoucher]);
+ }, [biayaKirim, cartCheckout?.grandTotal, activeVoucher, activeVoucherShipping]);
const checkout = async () => {
const file = poFile.current.files[0];
@@ -497,7 +497,7 @@ const Checkout = () => {
}
}
- const midtrans = async () => {
+ /* const midtrans = async () => {
for (const product of products) deleteItemCart({ productId: product.id });
if (grandTotal > 0) {
const payment = await axios.post(
@@ -513,7 +513,7 @@ const Checkout = () => {
'-'
)}`;
}
- };
+ };*/
};
const handlingActivateCode = async () => {
@@ -1189,7 +1189,7 @@ const Checkout = () => {
<div className='text-gray_r-11'>
Biaya Kirim <p className='text-xs mt-1'>{etdFix}</p>
</div>
- <div>{currencyFormat(biayaKirim)}</div>
+ <div>{currencyFormat(Math.round(parseInt(biayaKirim * 1.1) / 1000) * 1000)}</div>
</div>
{activeVoucherShipping && voucherShippingAmt && (
<div className='flex gap-x-2 justify-between'>
@@ -1490,7 +1490,7 @@ const Checkout = () => {
Biaya Kirim
<p className='text-xs mt-1'>{etdFix}</p>
</div>
- <div>{currencyFormat(biayaKirim)}</div>
+ <div>{currencyFormat(Math.round(parseInt(biayaKirim * 1.1) / 1000) * 1000) }</div>
</div>
{activeVoucherShipping && voucherShippingAmt && (
<div className='flex gap-x-2 justify-between'>
diff --git a/src/lib/home/components/CategoryDynamic.jsx b/src/lib/home/components/CategoryDynamic.jsx
index c257e9f9..14015e28 100644
--- a/src/lib/home/components/CategoryDynamic.jsx
+++ b/src/lib/home/components/CategoryDynamic.jsx
@@ -1,5 +1,6 @@
-import React, { useEffect, useState } from 'react';
+import React, { useEffect, useState, useCallback } from 'react';
import useCategoryManagement from '../hooks/useCategoryManagement';
+import {fetchPopulerProductSolr} from '../api/categoryManagementApi'
import NextImage from 'next/image';
import Link from "next/link";
import { createSlug } from '@/core/utils/slug';
@@ -12,6 +13,7 @@ import 'swiper/css/pagination';
import { Navigation, Pagination, Autoplay } from 'swiper';
const CategoryDynamic = () => {
+
const { categoryManagement } = useCategoryManagement();
// const [categoryData, setCategoryData] = useState({});
// const [subCategoryData, setSubCategoryData] = useState({});