feat(06-03): update display components to use categoryIcon with LucideIcon

- Rename categoryEmoji to categoryIcon in ItemCard, CandidateCard, ThreadCard, ItemPicker
- Import and render LucideIcon at appropriate sizes (36px placeholder, 14-16px badges)
- Update hook interfaces to match server API (categoryIcon instead of categoryEmoji)
- Rename iconData.ts to iconData.tsx (contains JSX)
- Update useCategories mutation type to use icon instead of emoji

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-15 17:57:21 +01:00
parent 59d1c891f9
commit 615c8944c4
10 changed files with 25 additions and 21 deletions

View File

@@ -1,4 +1,5 @@
import { formatPrice, formatWeight } from "../lib/formatters";
import { LucideIcon } from "../lib/iconData";
import { useUIStore } from "../stores/uiStore";
interface CandidateCardProps {
@@ -7,7 +8,7 @@ interface CandidateCardProps {
weightGrams: number | null;
priceCents: number | null;
categoryName: string;
categoryEmoji: string;
categoryIcon: string;
imageFilename: string | null;
threadId: number;
isActive: boolean;
@@ -19,7 +20,7 @@ export function CandidateCard({
weightGrams,
priceCents,
categoryName,
categoryEmoji,
categoryIcon,
imageFilename,
threadId,
isActive,
@@ -41,7 +42,7 @@ export function CandidateCard({
/>
) : (
<div className="w-full h-full flex flex-col items-center justify-center">
<span className="text-3xl">{categoryEmoji}</span>
<LucideIcon name={categoryIcon} size={36} className="text-gray-400" />
</div>
)}
</div>
@@ -61,7 +62,7 @@ export function CandidateCard({
</span>
)}
<span className="inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-gray-50 text-gray-600">
{categoryEmoji} {categoryName}
<LucideIcon name={categoryIcon} size={14} className="inline-block mr-1 text-gray-500" /> {categoryName}
</span>
</div>
<div className="flex gap-2">