Compare commits
1 Commits
version_30
...
version_31
| Author | SHA1 | Date | |
|---|---|---|---|
| 054c045ad2 |
@@ -40,6 +40,7 @@ const ProductCardItem = memo(({
|
|||||||
cardNameClassName = "",
|
cardNameClassName = "",
|
||||||
cardPriceClassName = "",
|
cardPriceClassName = "",
|
||||||
}: ProductCardItemProps) => {
|
}: ProductCardItemProps) => {
|
||||||
|
const priceNumber = parseFloat(product.price.replace(/[^0-9.-]+/g, ""));
|
||||||
return (
|
return (
|
||||||
<article
|
<article
|
||||||
className={cls("card group relative h-full flex flex-col gap-4 cursor-pointer p-4 rounded-theme-capped", cardClassName)}
|
className={cls("card group relative h-full flex flex-col gap-4 cursor-pointer p-4 rounded-theme-capped", cardClassName)}
|
||||||
@@ -60,6 +61,9 @@ const ProductCardItem = memo(({
|
|||||||
{product.name?.includes("Data Science") && (
|
{product.name?.includes("Data Science") && (
|
||||||
<span className="inline-block px-3 py-1 text-sm font-medium rounded-full bg-primary-cta/10 text-primary-cta">Most Popular</span>
|
<span className="inline-block px-3 py-1 text-sm font-medium rounded-full bg-primary-cta/10 text-primary-cta">Most Popular</span>
|
||||||
)}
|
)}
|
||||||
|
{priceNumber < 14000 && (
|
||||||
|
<span className="inline-block px-3 py-1 text-sm font-medium rounded-full bg-warning-cta/10 text-warning-cta">Limited Seats</span>
|
||||||
|
)}
|
||||||
<h3 className={cls("text-base font-medium truncate leading-[1.3]", shouldUseLightText ? "text-background" : "text-foreground", cardNameClassName)}>
|
<h3 className={cls("text-base font-medium truncate leading-[1.3]", shouldUseLightText ? "text-background" : "text-foreground", cardNameClassName)}>
|
||||||
{product.name}
|
{product.name}
|
||||||
</h3>
|
</h3>
|
||||||
|
|||||||
Reference in New Issue
Block a user