Commit 0c251f9a authored by Steven's avatar Steven

chore: fix resource delete handler

parent 0a9212f8
...@@ -36,18 +36,18 @@ const ResourceListView = (props: Props) => { ...@@ -36,18 +36,18 @@ const ResourceListView = (props: Props) => {
<div className="w-full flex flex-row justify-start flex-wrap gap-2 mt-2"> <div className="w-full flex flex-row justify-start flex-wrap gap-2 mt-2">
{resourceList.map((resource) => { {resourceList.map((resource) => {
return ( return (
<SortableItem <div
key={resource.name} key={resource.name}
id={resource.name}
className="max-w-full w-auto flex flex-row justify-start items-center flex-nowrap gap-x-1 bg-zinc-100 dark:bg-zinc-900 px-2 py-1 rounded hover:shadow-sm text-gray-500 dark:text-gray-400" className="max-w-full w-auto flex flex-row justify-start items-center flex-nowrap gap-x-1 bg-zinc-100 dark:bg-zinc-900 px-2 py-1 rounded hover:shadow-sm text-gray-500 dark:text-gray-400"
> >
<ResourceIcon resource={resource} className="!w-4 !h-4 !opacity-100" /> <SortableItem id={resource.name} className="flex flex-row justify-start items-center gap-x-1">
<span className="text-sm max-w-[8rem] truncate">{resource.filename}</span> <ResourceIcon resource={resource} className="!w-4 !h-4 !opacity-100" />
<Icon.X <span className="text-sm max-w-[8rem] truncate">{resource.filename}</span>
className="w-4 h-auto cursor-pointer opacity-60 hover:opacity-100" </SortableItem>
onClick={() => handleDeleteResource(resource.name)} <button className="shrink-0" onClick={() => handleDeleteResource(resource.name)}>
/> <Icon.X className="w-4 h-auto cursor-pointer opacity-60 hover:opacity-100" />
</SortableItem> </button>
</div>
); );
})} })}
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment