From cdb9de59bbf2b359650c8b9bbe042d1c5eb2b483 Mon Sep 17 00:00:00 2001 From: Luca Rossi Date: Fri, 27 Feb 2026 12:12:58 +0100 Subject: [PATCH] fix: remove duplicate type icon in add-property input (#107) SelectValue already renders the icon from the selected SelectItem, so the explicit Icon in SelectTrigger caused the type icon to appear twice. Co-authored-by: Claude Opus 4.6 --- src/components/DynamicPropertiesPanel.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/DynamicPropertiesPanel.tsx b/src/components/DynamicPropertiesPanel.tsx index 7ac96797..50054e93 100644 --- a/src/components/DynamicPropertiesPanel.tsx +++ b/src/components/DynamicPropertiesPanel.tsx @@ -8,10 +8,9 @@ import { Button } from '@/components/ui/button' import { Calendar } from '@/components/ui/calendar' import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover' import { Select, SelectContent, SelectItem, SelectSeparator, SelectTrigger, SelectValue } from '@/components/ui/select' -import { CalendarIcon, XIcon } from 'lucide-react' +import { CalendarIcon, XIcon, Check, X, Type, ToggleLeft, Circle, Link } from 'lucide-react' import { getTypeColor, getTypeLightColor } from '../utils/typeColors' import { countWords } from '../utils/wikilinks' -import { Check, X, Type, Calendar as CalendarIcon2, ToggleLeft, Circle, Link } from 'lucide-react' import { type PropertyDisplayMode, getEffectiveDisplayMode, @@ -237,7 +236,7 @@ function DisplayModeSelector({ propKey, currentMode, autoMode, onSelect }: { } const DISPLAY_MODE_ICONS: Record = { - text: Type, date: CalendarIcon2, boolean: ToggleLeft, status: Circle, url: Link, + text: Type, date: CalendarIcon, boolean: ToggleLeft, status: Circle, url: Link, } function AddPropertyForm({ onAdd, onCancel }: { @@ -252,8 +251,6 @@ function AddPropertyForm({ onAdd, onCancel }: { else if (e.key === 'Escape') onCancel() } - const Icon = DISPLAY_MODE_ICONS[displayMode] - return (
-