summaryrefslogtreecommitdiff
path: root/src-migrate/modules/product-detail/stores
diff options
context:
space:
mode:
authortrisusilo48 <tri.susilo@altama.co.id>2024-11-13 14:47:56 +0700
committertrisusilo48 <tri.susilo@altama.co.id>2024-11-13 14:47:56 +0700
commit2c74398c6f75de3b5620d6495d7701553b66eb40 (patch)
treea6c48649d18ca56189ce621f823754db66d7a138 /src-migrate/modules/product-detail/stores
parent7966f67569d01c25f7a337962d7d0bb1a0c57808 (diff)
parent399e7b149bd409e0b5a96fd8c6eaac4f23181ef0 (diff)
Merge branch 'new-release' into feature/integrasi_biteship
Diffstat (limited to 'src-migrate/modules/product-detail/stores')
-rw-r--r--src-migrate/modules/product-detail/stores/useProductDetail.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/src-migrate/modules/product-detail/stores/useProductDetail.ts b/src-migrate/modules/product-detail/stores/useProductDetail.ts
index eb409930..dee6b342 100644
--- a/src-migrate/modules/product-detail/stores/useProductDetail.ts
+++ b/src-migrate/modules/product-detail/stores/useProductDetail.ts
@@ -7,6 +7,8 @@ type State = {
quantityInput: string;
askAdminUrl: string;
isApproval : boolean;
+ selectedVariant : any;
+ sla : any;
};
type Action = {
@@ -14,6 +16,8 @@ type Action = {
setQuantityInput: (value: string) => void;
setAskAdminUrl: (url: string) => void;
setIsApproval : (value : boolean) => void;
+ setSelectedVariant : (value : any) => void;
+ setSla : (value : any) => void;
};
export const useProductDetail = create<State & Action>((set, get) => ({
@@ -22,6 +26,8 @@ export const useProductDetail = create<State & Action>((set, get) => ({
quantityInput: '1',
askAdminUrl: '',
isApproval : false,
+ selectedVariant: null,
+ sla : null,
setActive: (variant) => {
set({ activeVariantId: variant?.id, activePrice: variant?.price });
},
@@ -33,5 +39,11 @@ export const useProductDetail = create<State & Action>((set, get) => ({
},
setIsApproval : (value : boolean) => {
set({ isApproval : value })
+ },
+ setSelectedVariant : (value : any) => {
+ set({ selectedVariant : value })
+ },
+ setSla : (value : any ) => {
+ set({ sla : value })
}
}));