summaryrefslogtreecommitdiff
path: root/src-migrate
diff options
context:
space:
mode:
authorMiqdad <ahmadmiqdad27@gmail.com>2025-08-26 15:38:29 +0700
committerMiqdad <ahmadmiqdad27@gmail.com>2025-08-26 15:38:29 +0700
commit37bda78dec58cb8c218849a77620d95682b201b9 (patch)
treecdcddc01583634a4466350c9600d597e422ae35a /src-migrate
parenta078561462fb33f24d838c974894b3fc7d6c9eb7 (diff)
<Miqdad> Major Fix
Diffstat (limited to 'src-migrate')
-rw-r--r--src-migrate/modules/product-detail/components/AddToCart.tsx9
-rw-r--r--src-migrate/modules/product-detail/components/AddToQuotation.tsx7
-rw-r--r--src-migrate/modules/product-detail/components/PriceAction.tsx14
-rw-r--r--src-migrate/modules/product-detail/components/ProductDetail.tsx4
4 files changed, 18 insertions, 16 deletions
diff --git a/src-migrate/modules/product-detail/components/AddToCart.tsx b/src-migrate/modules/product-detail/components/AddToCart.tsx
index 9f66345e..1cb58a75 100644
--- a/src-migrate/modules/product-detail/components/AddToCart.tsx
+++ b/src-migrate/modules/product-detail/components/AddToCart.tsx
@@ -1,6 +1,6 @@
import BottomPopup from '@/core/components/elements/Popup/BottomPopup';
import style from '../styles/price-action.module.css';
-import { Button, Link, useToast } from '@chakra-ui/react';
+import { Button, color, Link, useToast } from '@chakra-ui/react';
import product from 'next-seo/lib/jsonld/product';
import { useRouter } from 'next/router';
import { useEffect, useState } from 'react';
@@ -163,13 +163,13 @@ const AddToCart = ({
const btnConfig = {
add_to_cart: {
- colorScheme: isDesktop ? 'yellow' : 'red',
- variant: 'solid',
+ colorScheme: 'red',
+ variant: 'outline',
text: 'Keranjang',
},
buy: {
colorScheme: 'red',
- variant: isDesktop ? 'solid' : 'outline',
+ variant: 'solid',
text: isDesktop ? 'Beli' : 'Beli Sekarang',
},
};
@@ -190,6 +190,7 @@ const AddToCart = ({
<Button
onClick={handleButton}
colorScheme={btnConfig[source].colorScheme}
+ variant= {btnConfig[source].variant}
className='w-full'
>
{btnConfig[source].text}
diff --git a/src-migrate/modules/product-detail/components/AddToQuotation.tsx b/src-migrate/modules/product-detail/components/AddToQuotation.tsx
index 17a62eee..ebfcef32 100644
--- a/src-migrate/modules/product-detail/components/AddToQuotation.tsx
+++ b/src-migrate/modules/product-detail/components/AddToQuotation.tsx
@@ -106,12 +106,13 @@ const AddToQuotation = ({
const btnConfig = {
add_to_cart: {
- colorScheme: 'yellow',
-
+ colorScheme: 'red',
+ variant: 'outline',
text: 'Keranjang',
},
buy: {
colorScheme: 'red',
+ variant: 'solid',
text: 'Beli',
},
};
@@ -125,7 +126,7 @@ const AddToQuotation = ({
className='w-full border-2 p-2 gap-1 hover:bg-slate-100 flex items-center'
>
<ImageNext
- src='/images/document.png'
+ src= {isDesktop ? '/images/doc_red.svg' : '/images/doc.svg'}
alt='penawaran instan'
className=''
width={25}
diff --git a/src-migrate/modules/product-detail/components/PriceAction.tsx b/src-migrate/modules/product-detail/components/PriceAction.tsx
index 5daf5bed..ffc9ba40 100644
--- a/src-migrate/modules/product-detail/components/PriceAction.tsx
+++ b/src-migrate/modules/product-detail/components/PriceAction.tsx
@@ -342,6 +342,13 @@ const PriceAction = ({ product }: Props) => {
/>
</div>
<div className='col-span-5'>
+ <AddToCart
+ products={product}
+ variantId={activeVariantId}
+ quantity={Number(quantityInput)}
+ />
+ </div>
+ <div className='col-span-5'>
{!isApproval && (
<AddToCart
source='buy'
@@ -351,13 +358,6 @@ const PriceAction = ({ product }: Props) => {
/>
)}
</div>
- <div className='col-span-5'>
- <AddToCart
- products={product}
- variantId={activeVariantId}
- quantity={Number(quantityInput)}
- />
- </div>
</div>
</MobileView>
</div>
diff --git a/src-migrate/modules/product-detail/components/ProductDetail.tsx b/src-migrate/modules/product-detail/components/ProductDetail.tsx
index 35df97df..79921e22 100644
--- a/src-migrate/modules/product-detail/components/ProductDetail.tsx
+++ b/src-migrate/modules/product-detail/components/ProductDetail.tsx
@@ -161,7 +161,7 @@ return (
<img
src={img}
alt={`Gambar ${i + 1}`}
- className='w-[80%] aspect-square object-contain'
+ className='w-[85%] aspect-square object-contain'
onError={(e) => {
(e.target as HTMLImageElement).src =
'/path/to/fallback-image.jpg';
@@ -174,7 +174,7 @@ return (
<img
src={mainImage || '/path/to/fallback-image.jpg'}
alt='Gambar produk'
- className='w-[80%] aspect-square object-contain'
+ className='w-[85%] aspect-square object-contain'
/>
</div>
)}