Skip to content

Commit df152a3

Browse files
committed
linting
1 parent b8e69f9 commit df152a3

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

src/components/ModelCatalog.tsx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,18 @@ const ModelCatalog = ({ models }: { models: WorkersAIModelsSchema[] }) => {
3131
// First check if either model is pinned
3232
const isPinnedA = pinnedModelNames.includes(a.name);
3333
const isPinnedB = pinnedModelNames.includes(b.name);
34-
34+
3535
// If pinned status differs, prioritize pinned models
3636
if (isPinnedA && !isPinnedB) return -1;
3737
if (!isPinnedA && isPinnedB) return 1;
38-
38+
3939
// If both are pinned, sort by position in pinnedModelNames array (for manual ordering)
4040
if (isPinnedA && isPinnedB) {
41-
return pinnedModelNames.indexOf(a.name) - pinnedModelNames.indexOf(b.name);
41+
return (
42+
pinnedModelNames.indexOf(a.name) - pinnedModelNames.indexOf(b.name)
43+
);
4244
}
43-
45+
4446
// If neither is pinned, sort by created_at date (newest first)
4547
const dateA = a.created_at ? new Date(a.created_at) : new Date(0);
4648
const dateB = b.created_at ? new Date(b.created_at) : new Date(0);
@@ -271,11 +273,13 @@ const ModelCatalog = ({ models }: { models: WorkersAIModelsSchema[] }) => {
271273
return (
272274
<a
273275
key={model.model.id}
274-
className="mb-3 block w-full self-start rounded-md border border-solid border-gray-200 p-3 !text-inherit no-underline hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800 lg:w-[48%] relative"
276+
className="relative mb-3 block w-full self-start rounded-md border border-solid border-gray-200 p-3 !text-inherit no-underline hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800 lg:w-[48%]"
275277
href={`/workers-ai/models/${model.model_display_name}`}
276278
>
277279
{isPinned && (
278-
<span className="absolute top-1 right-2" title="Pinned model">📌</span>
280+
<span className="absolute right-2 top-1" title="Pinned model">
281+
📌
282+
</span>
279283
)}
280284
<div className="-mb-1 flex items-center">
281285
{authorInfo?.logo ? (
@@ -311,4 +315,4 @@ const ModelCatalog = ({ models }: { models: WorkersAIModelsSchema[] }) => {
311315
);
312316
};
313317

314-
export default ModelCatalog;
318+
export default ModelCatalog;

src/components/models/ModelFeatures.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,9 @@ const ModelFeatures = ({ model }: { model: WorkersAIModelsSchema }) => {
115115
<td>Unit Pricing</td>
116116
<td>
117117
{properties.price
118-
.map((price: { price: number; unit: string }) =>
119-
`${currencyFormatter.format(price.price)} ${price.unit}`
118+
.map(
119+
(price: { price: number; unit: string }) =>
120+
`${currencyFormatter.format(price.price)} ${price.unit}`,
120121
)
121122
.join(", ")}
122123
</td>

src/schemas/workers-ai-models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ export const workersAiModelsSchema = z.object({
2424
input: z.object({}).passthrough(),
2525
output: z.object({}).passthrough(),
2626
}),
27-
})
27+
});

0 commit comments

Comments
 (0)