empty list

This commit is contained in:
jZonG 2025-05-07 20:40:38 +08:00
parent d4b7a36182
commit 5a8c12470c

View File

@ -13,16 +13,35 @@ const MCPList = ({
const handleCreate = () => { const handleCreate = () => {
console.log('handleCreate') console.log('handleCreate')
} }
function renderDefaultCard() {
const defaultCards = Array.from({ length: 36 }, (_, index) => (
<div
key={index}
className={cn(
'inline-flex h-[108px] rounded-xl bg-background-default-lighter opacity-10',
index < 4 && 'opacity-60',
index >= 4 && index < 8 && 'opacity-50',
index >= 8 && index < 12 && 'opacity-40',
index >= 12 && index < 16 && 'opacity-30',
index >= 16 && index < 20 && 'opacity-25',
index >= 20 && index < 24 && 'opacity-20',
)}
></div>
))
return defaultCards
}
return ( return (
<> <>
<div <div
className={cn( className={cn(
'relative grid shrink-0 grid-cols-1 content-start gap-4 px-12 pb-4 pt-2 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4', 'relative grid shrink-0 grid-cols-1 content-start gap-4 px-12 pb-4 pt-2 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4',
// 'overflow-hidden', 'h-[calc(100vh_-_136px)] overflow-hidden',
)} )}
> >
<NewMCPCard handleCreate={handleCreate} /> <NewMCPCard handleCreate={handleCreate} />
{searchText} {renderDefaultCard()}
</div> </div>
</> </>
) )