Add cover image model hub screen
This commit is contained in:
parent
f3fbade975
commit
d63c9c3d46
@ -240,6 +240,7 @@ export type ModelMetadata = {
|
||||
author: string;
|
||||
tags: string[];
|
||||
size: number;
|
||||
cover?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@ -98,9 +98,15 @@ const ExploreModelItemHeader: React.FC<Props> = ({ model, onClick, open }) => {
|
||||
|
||||
return (
|
||||
<div
|
||||
className="flex cursor-pointer items-center justify-between rounded-t-md bg-background/50 px-4 py-4"
|
||||
className="cursor-pointer rounded-t-md bg-background/50"
|
||||
onClick={onClick}
|
||||
>
|
||||
{model.metadata.cover && (
|
||||
<div className="relative h-full w-full">
|
||||
<img src={model.metadata.cover} alt={`Cover - ${model.id}`} />
|
||||
</div>
|
||||
)}
|
||||
<div className="flex items-center justify-between p-4">
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="font-bold">{model.name}</span>
|
||||
</div>
|
||||
@ -117,6 +123,7 @@ const ExploreModelItemHeader: React.FC<Props> = ({ model, onClick, open }) => {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user