diff --git a/components/ItemCard.tsx b/components/ItemCard.tsx index 9b1a7fd..fd44329 100644 --- a/components/ItemCard.tsx +++ b/components/ItemCard.tsx @@ -33,24 +33,33 @@ function ItemCard({ item, listId }: ItemCardProps) { const priorityColor = priorityColors[item.priority as keyof typeof priorityColors] || priorityColors.medium return ( -
-
+
+
{/* Completion Toggle */} -
+
{/* Content */}
-

- {item.title} -

+
+

+ {item.title} +

+ + {/* Priority Badge - moved to right */} + + + {item.priority.charAt(0).toUpperCase() + item.priority.slice(1)} + {item.priority.charAt(0).toUpperCase()} + +
{item.description && ( -

{item.description} @@ -58,42 +67,37 @@ function ItemCard({ item, listId }: ItemCardProps) { )} {/* Metadata */} -

- {/* Priority Badge */} - - - {item.priority.charAt(0).toUpperCase() + item.priority.slice(1)} - {item.priority.charAt(0).toUpperCase()} - - - {/* Due Date */} - {item.dueDate && ( - - - {new Date(item.dueDate).toLocaleDateString('en-US', { - month: 'short', - day: 'numeric', - })} - {isOverdue && (Overdue)} - {isOverdue && !} - - )} - - {/* Tags */} - {tags.length > 0 && ( -
- - - {tags.slice(0, 2).join(', ')} - {tags.length > 2 && ` +${tags.length - 2}`} + {(item.dueDate || tags.length > 0) && ( +
+ {/* Due Date */} + {item.dueDate && ( + + + {new Date(item.dueDate).toLocaleDateString('en-US', { + month: 'short', + day: 'numeric', + })} + {isOverdue && (Overdue)} + {isOverdue && !} -
- )} -
+ )} + + {/* Tags */} + {tags.length > 0 && ( +
+ + + {tags.slice(0, 2).join(', ')} + {tags.length > 2 && ` +${tags.length - 2}`} + +
+ )} +
+ )}