mirror of
https://github.com/vercel/commerce.git
synced 2025-05-18 23:46:58 +00:00
creating dynamic product info page
This commit is contained in:
parent
80490d88b4
commit
3d1aa2f922
@ -6,6 +6,7 @@ import { SustainabilityInfo } from './sustainability-info';
|
|||||||
import { VariantSelector } from './variant-selector';
|
import { VariantSelector } from './variant-selector';
|
||||||
|
|
||||||
export function ProductDescription({ product }: { product: Product }) {
|
export function ProductDescription({ product }: { product: Product }) {
|
||||||
|
const filterDeterminedOptions = product.options.filter(option => option.name !== 'Wrap')
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="mb-6 flex flex-col border-b pb-6 dark:border-neutral-700">
|
<div className="mb-6 flex flex-col border-b pb-6 dark:border-neutral-700">
|
||||||
@ -17,11 +18,11 @@ export function ProductDescription({ product }: { product: Product }) {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<VariantSelector options={product.options} variants={product.variants} />
|
<VariantSelector options={filterDeterminedOptions} variants={product.variants} />
|
||||||
<AddToCart variants={product.variants} availableForSale={product.availableForSale} />
|
<AddToCart variants={product.variants} availableForSale={product.availableForSale} />
|
||||||
|
|
||||||
<DescriptionContent product={product} />
|
<DescriptionContent product={product} />
|
||||||
<SustainabilityInfo />
|
{!product.tags.includes('wall') && <SustainabilityInfo />}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user