feat: adding more information warranty, part number, sku, speciall offers

Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
Chloe
2024-04-25 14:14:20 +07:00
parent e3f564ca77
commit 59c3f07beb
14 changed files with 215 additions and 85 deletions

View File

@@ -11,12 +11,10 @@ type CoreChargeBadgeProps = {
const CoreChargeBadge = ({ variants, selectedOptions }: CoreChargeBadgeProps) => {
const selectedOptionsMap = new Map(selectedOptions.map((option) => [option.name, option.value]));
console.log({ selectedOptionsMap, variants });
const variant = variants.find((variant: ProductVariant) =>
variant.selectedOptions.every((option) => option.value === selectedOptionsMap.get(option.name))
);
console.log({ variant });
return <CoreCharge variant={variant} sm />;
};

View File

@@ -183,7 +183,7 @@ export default function CartModal({ cart }: { cart: Cart | undefined }) {
</div>
<a
href={cart.checkoutUrl}
className="block w-full rounded-full bg-blue-600 p-3 text-center text-sm font-medium text-white opacity-90 hover:opacity-100"
className="block w-full rounded-full bg-secondary p-3 text-center text-sm font-medium text-white opacity-90 hover:opacity-100"
>
Proceed to Checkout
</a>