Merge branch 'fix/consistent-complete-package-cart-ui' into fix/standardized-phone-validation-and-billing
This commit is contained in:
commit
62c7a4aead
|
|
@ -113,13 +113,31 @@ export const CartDrawer: React.FC<CartDrawerProps> = ({
|
|||
</div>
|
||||
) : (
|
||||
<div className="space-y-3 max-h-[220px] overflow-y-auto pr-1">
|
||||
{cart.map((item) => (
|
||||
{cart.map((item) => {
|
||||
const isCompletePackage =
|
||||
item.code === 'POINTS_PACK' ||
|
||||
item.code === 'PATTERN_CORE' ||
|
||||
item.code === 'NUTRITION_CORE' ||
|
||||
item.code === 'THERAPEUTICS_CORE' ||
|
||||
item.name.toLowerCase().includes('complete pack') ||
|
||||
item.name.toLowerCase().includes('complete package') ||
|
||||
item.name.toLowerCase().includes('complete bundle') ||
|
||||
item.category === 'Bundle';
|
||||
|
||||
return (
|
||||
<div
|
||||
key={item.code}
|
||||
className="flex justify-between items-center gap-4 bg-slate-50 border border-slate-200/60 p-3 rounded-2xl"
|
||||
>
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="flex items-center gap-1.5 flex-wrap min-w-0">
|
||||
<p className="text-xs font-bold text-slate-800 truncate">{item.name}</p>
|
||||
{isCompletePackage && (
|
||||
<span className="text-[8px] bg-gradient-to-r from-indigo-500 to-purple-600 text-white font-extrabold px-1.5 py-0.5 rounded tracking-wider uppercase flex-shrink-0">
|
||||
Complete Pack
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<p className="text-[9px] text-slate-400 tracking-wider uppercase font-semibold">{item.category}</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-3">
|
||||
|
|
@ -142,7 +160,8 @@ export const CartDrawer: React.FC<CartDrawerProps> = ({
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue