Skip to content

Commit 9ffd6f1

Browse files
committed
pricing in one line
1 parent 48cb4b8 commit 9ffd6f1

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

src/components/models/ModelFeatures.tsx

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,18 @@ const ModelFeatures = ({ model }: { model: WorkersAIModelsSchema }) => {
110110
<td>Yes</td>
111111
</tr>
112112
)}
113-
{properties.price &&
114-
properties.price.map(
115-
(price: { price: number; unit: string }) => (
116-
<tr key={price.price}>
117-
<td>Pricing</td>
118-
<td>
119-
{currencyFormatter.format(price.price)} {price.unit}
120-
</td>
121-
</tr>
122-
),
123-
)}
113+
{properties.price && properties.price.length > 0 && (
114+
<tr>
115+
<td>Unit Pricing</td>
116+
<td>
117+
{properties.price
118+
.map((price: { price: number; unit: string }) =>
119+
`${currencyFormatter.format(price.price)} ${price.unit}`
120+
)
121+
.join(", ")}
122+
</td>
123+
</tr>
124+
)}
124125
</tbody>
125126
</table>
126127
</>

0 commit comments

Comments
 (0)