x
This commit is contained in:
1 parent
c3c2d97cc1
commit
a94e72ba0e
1 file changed
+9
-1
@@ -48,6 +48,7 @@ interface Props {
|
|||||||
product: Product
|
product: Product
|
||||||
showBrandMeta?: boolean
|
showBrandMeta?: boolean
|
||||||
showMobileStickyBar?: boolean
|
showMobileStickyBar?: boolean
|
||||||
|
showTrustBadges?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const UI_TRANSLATIONS: Record<string, {
|
const UI_TRANSLATIONS: Record<string, {
|
||||||
@@ -218,7 +219,12 @@ const UI_TRANSLATIONS: Record<string, {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function AddToCartSection({ product, showBrandMeta = true, showMobileStickyBar = true }: Props) {
|
export default function AddToCartSection({
|
||||||
|
product,
|
||||||
|
showBrandMeta = true,
|
||||||
|
showMobileStickyBar = true,
|
||||||
|
showTrustBadges = false,
|
||||||
|
}: Props) {
|
||||||
const [selectedOptions, setSelectedOptions] = useState<string[]>(() => {
|
const [selectedOptions, setSelectedOptions] = useState<string[]>(() => {
|
||||||
if (product.variants && product.variants.length > 0) {
|
if (product.variants && product.variants.length > 0) {
|
||||||
const first = product.variants[0];
|
const first = product.variants[0];
|
||||||
@@ -546,6 +552,7 @@ export default function AddToCartSection({ product, showBrandMeta = true, showMo
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Trust Badges 4 Grid */}
|
{/* Trust Badges 4 Grid */}
|
||||||
|
{showTrustBadges && (
|
||||||
<div className="grid grid-cols-2 md:grid-cols-4 gap-3 pt-6 border-t border-line-primary/20 text-xs">
|
<div className="grid grid-cols-2 md:grid-cols-4 gap-3 pt-6 border-t border-line-primary/20 text-xs">
|
||||||
{t.badges.map((badge, idx) => {
|
{t.badges.map((badge, idx) => {
|
||||||
const Icon = idx === 0 ? Truck : idx === 1 ? ShieldCheck : idx === 2 ? RotateCcw : MessageCircle;
|
const Icon = idx === 0 ? Truck : idx === 1 ? ShieldCheck : idx === 2 ? RotateCcw : MessageCircle;
|
||||||
@@ -560,6 +567,7 @@ export default function AddToCartSection({ product, showBrandMeta = true, showMo
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user