fix: Resolve TSX syntax error in TypeLibrary and update task list
This commit is contained in:
parent
7b5321cb14
commit
ec9e98e696
1 changed files with 7 additions and 4 deletions
|
|
@ -86,6 +86,8 @@ export function TypeLibrary({ plantTypes, onDragStart, onCreateType, className }
|
|||
|
||||
const isExpanded = expandedCategories.has(category);
|
||||
|
||||
const categoryData = CATEGORY_LABELS[category];
|
||||
|
||||
return (
|
||||
<div key={category} className="border-b border-slate-800">
|
||||
<button
|
||||
|
|
@ -93,13 +95,14 @@ export function TypeLibrary({ plantTypes, onDragStart, onCreateType, className }
|
|||
className="w-full px-3 py-2 flex items-center justify-between text-left hover:bg-slate-800 transition-colors"
|
||||
>
|
||||
<span className="text-sm font-medium text-slate-300 flex items-center gap-2">
|
||||
{CATEGORY_LABELS[category] && (
|
||||
{categoryData ? (
|
||||
<>
|
||||
<CATEGORY_LABELS[category].Icon className="w-4 h-4 text-emerald-500" />
|
||||
{CATEGORY_LABELS[category].label}
|
||||
<categoryData.Icon className="w-4 h-4 text-emerald-500" />
|
||||
{categoryData.label}
|
||||
</>
|
||||
) : (
|
||||
category
|
||||
)}
|
||||
{!CATEGORY_LABELS[category] && category}
|
||||
<span className="text-xs text-slate-500">({types.length})</span>
|
||||
</span>
|
||||
<ChevronDown className={cn('w-4 h-4 text-slate-400 transition-transform', isExpanded && 'rotate-180')} />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue