summaryrefslogtreecommitdiff
path: root/src-migrate/modules/product-detail/components/ProductDetail.tsx
diff options
context:
space:
mode:
authorMqdd <ahmadmiqdad27@gmail.com>2025-12-15 13:10:42 +0700
committerMqdd <ahmadmiqdad27@gmail.com>2025-12-15 13:10:42 +0700
commit517dce1136351f57e68e08f632635ac0a1ab6bff (patch)
tree1514478948c9c9d6a71661842a57122efece5062 /src-migrate/modules/product-detail/components/ProductDetail.tsx
parent4f133e1de46fa50982e9cd3b6063eea7c1d10528 (diff)
<Miqdad> fix bug select variant
Diffstat (limited to 'src-migrate/modules/product-detail/components/ProductDetail.tsx')
-rw-r--r--src-migrate/modules/product-detail/components/ProductDetail.tsx12
1 files changed, 12 insertions, 0 deletions
diff --git a/src-migrate/modules/product-detail/components/ProductDetail.tsx b/src-migrate/modules/product-detail/components/ProductDetail.tsx
index 085bbb1c..129ca8de 100644
--- a/src-migrate/modules/product-detail/components/ProductDetail.tsx
+++ b/src-migrate/modules/product-detail/components/ProductDetail.tsx
@@ -83,6 +83,18 @@ const ProductDetail = ({ product }: Props) => {
setAskAdminUrl(createdAskUrl);
}, [router.asPath, product.manufacture.name, product.name, setAskAdminUrl]);
+ // useEffect(() => {
+ // if (!product?.variants?.length) return;
+
+ // setIsApproval(auth?.feature?.soApproval);
+
+ // setSelectedVariant((prev: any) => {
+ // if (prev) return prev;
+
+ // return product.variants[0];
+ // });
+ // }, [product?.id]);
+
useEffect(() => {
if (typeof auth === 'object') {
setIsApproval(auth?.feature?.soApproval);