Skip to content

Commit 69a99c1

Browse files
authored
Adds realtime and partner badges and features (#24714)
1 parent 5f55930 commit 69a99c1

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

src/components/models/ModelBadges.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,20 @@ const ModelBadges = ({ model }: { model: WorkersAIModelsSchema }) => {
2323
};
2424
}
2525

26+
if (property_id === "partner" && value === "true") {
27+
return {
28+
variant: "note",
29+
text: "Partner",
30+
};
31+
}
32+
33+
if (property_id === "realtime" && value === "true") {
34+
return {
35+
variant: "note",
36+
text: "Real-time",
37+
};
38+
}
39+
2640
if (property_id === "planned_deprecation_date") {
2741
const timestamp = Math.floor(new Date(value as string).getTime() / 1000);
2842

src/components/models/ModelFeatures.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,18 @@ const ModelFeatures = ({ model }: { model: WorkersAIModelsSchema }) => {
116116
<td>Yes</td>
117117
</tr>
118118
)}
119+
{properties.partner && (
120+
<tr>
121+
<td>Partner</td>
122+
<td>Yes</td>
123+
</tr>
124+
)}
125+
{properties.realtime && (
126+
<tr>
127+
<td>Real-time</td>
128+
<td>Yes</td>
129+
</tr>
130+
)}
119131
{properties.price && properties.price.length > 0 && (
120132
<tr>
121133
<td>Unit Pricing</td>

0 commit comments

Comments
 (0)