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:
@@ -29,7 +29,7 @@ export function useUpdateCategory() {
|
||||
}: {
|
||||
id: number;
|
||||
name?: string;
|
||||
emoji?: string;
|
||||
icon?: string;
|
||||
}) => apiPut<Category>(`/api/categories/${id}`, data),
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ["categories"] });
|
||||
|
||||
@@ -14,7 +14,7 @@ interface ItemWithCategory {
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
categoryName: string;
|
||||
categoryEmoji: string;
|
||||
categoryIcon: string;
|
||||
}
|
||||
|
||||
export function useItems() {
|
||||
|
||||
@@ -23,7 +23,7 @@ interface SetupItemWithCategory {
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
categoryName: string;
|
||||
categoryEmoji: string;
|
||||
categoryIcon: string;
|
||||
}
|
||||
|
||||
interface SetupWithItems {
|
||||
|
||||
@@ -8,7 +8,7 @@ interface ThreadListItem {
|
||||
resolvedCandidateId: number | null;
|
||||
categoryId: number;
|
||||
categoryName: string;
|
||||
categoryEmoji: string;
|
||||
categoryIcon: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
candidateCount: number;
|
||||
@@ -29,7 +29,7 @@ interface CandidateWithCategory {
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
categoryName: string;
|
||||
categoryEmoji: string;
|
||||
categoryIcon: string;
|
||||
}
|
||||
|
||||
interface ThreadWithCandidates {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { apiGet } from "../lib/api";
|
||||
interface CategoryTotals {
|
||||
categoryId: number;
|
||||
categoryName: string;
|
||||
categoryEmoji: string;
|
||||
categoryIcon: string;
|
||||
totalWeight: number;
|
||||
totalCost: number;
|
||||
itemCount: number;
|
||||
|
||||
Reference in New Issue
Block a user