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

@@ -3,6 +3,7 @@ import { SlideOutPanel } from "./SlideOutPanel";
import { useItems } from "../hooks/useItems";
import { useSyncSetupItems } from "../hooks/useSetups";
import { formatWeight, formatPrice } from "../lib/formatters";
import { LucideIcon } from "../lib/iconData";
interface ItemPickerProps {
setupId: number;
@@ -51,7 +52,7 @@ export function ItemPicker({
number,
{
categoryName: string;
categoryEmoji: string;
categoryIcon: string;
items: NonNullable<typeof items>;
}
>();
@@ -64,7 +65,7 @@ export function ItemPicker({
} else {
grouped.set(item.categoryId, {
categoryName: item.categoryName,
categoryEmoji: item.categoryEmoji,
categoryIcon: item.categoryIcon,
items: [item],
});
}
@@ -83,10 +84,10 @@ export function ItemPicker({
</div>
) : (
Array.from(grouped.entries()).map(
([categoryId, { categoryName, categoryEmoji, items: catItems }]) => (
([categoryId, { categoryName, categoryIcon, items: catItems }]) => (
<div key={categoryId} className="mb-4">
<h3 className="text-xs font-semibold text-gray-500 uppercase tracking-wider mb-2">
{categoryEmoji} {categoryName}
<LucideIcon name={categoryIcon} size={16} className="inline-block mr-1 text-gray-500" /> {categoryName}
</h3>
<div className="space-y-1">
{catItems.map((item) => (