Skip to content

Commit b8e69f9

Browse files
committed
added pinned model emoji
1 parent 3e315a9 commit b8e69f9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/components/ModelCatalog.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,17 @@ const ModelCatalog = ({ models }: { models: WorkersAIModelsSchema[] }) => {
266266

267267
const author = model.model.name.split("/")[1];
268268
const authorInfo = authorData[author];
269+
const isPinned = pinnedModelNames.includes(model.model.name);
269270

270271
return (
271272
<a
272273
key={model.model.id}
273-
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%]"
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"
274275
href={`/workers-ai/models/${model.model_display_name}`}
275276
>
277+
{isPinned && (
278+
<span className="absolute top-1 right-2" title="Pinned model">📌</span>
279+
)}
276280
<div className="-mb-1 flex items-center">
277281
{authorInfo?.logo ? (
278282
<img
@@ -307,4 +311,4 @@ const ModelCatalog = ({ models }: { models: WorkersAIModelsSchema[] }) => {
307311
);
308312
};
309313

310-
export default ModelCatalog;
314+
export default ModelCatalog;

0 commit comments

Comments
 (0)