Browse Source

🐛 fix(PricingCardView): hide placeholder dash when no custom tags

Previously, the card view displayed a “-” whenever a model had no custom tags,
because `renderLimitedItems` returned a dash for an empty array.
Now the function is only invoked when `customTags.length > 0`, removing the
unwanted placeholder and keeping the UI clean.

File affected:
- web/src/components/table/model-pricing/view/card/PricingCardView.jsx
t0ng7u 6 months ago
parent
commit
ffa898c52d

+ 1 - 1
web/src/components/table/model-pricing/view/card/PricingCardView.jsx

@@ -171,7 +171,7 @@ const PricingCardView = ({
           {billingTag}
         </div>
         <div className="flex items-center gap-1">
-          {renderLimitedItems({
+          {customTags.length > 0 && renderLimitedItems({
             items: customTags.map((tag, idx) => ({ key: `custom-${idx}`, element: tag })),
             renderItem: (item, idx) => item.element,
             maxDisplay: 3