feat(ADM-018): completed feature
This commit is contained in:
28
project/frontend/src/components/cart/ProductAddToCart.tsx
Normal file
28
project/frontend/src/components/cart/ProductAddToCart.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
'use client';
|
||||
import { useState } from 'react';
|
||||
import AddToCartButton from './AddToCartButton';
|
||||
|
||||
interface Props {
|
||||
variantId: string;
|
||||
productId: string;
|
||||
productName: string;
|
||||
priceCents: number;
|
||||
imageUrl?: string;
|
||||
available: boolean;
|
||||
}
|
||||
|
||||
export default function ProductAddToCart({ variantId, productId, productName, priceCents, imageUrl, available }: Props) {
|
||||
return (
|
||||
<div className="mt-6">
|
||||
<AddToCartButton
|
||||
variantId={variantId}
|
||||
productId={productId}
|
||||
productName={productName}
|
||||
priceCents={priceCents}
|
||||
imageUrl={imageUrl}
|
||||
available={available}
|
||||
className="w-full sm:w-auto"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user