diff --git a/frontend/src/components/RecipeCard.tsx b/frontend/src/components/RecipeCard.tsx index 401e55a..5a2b7d4 100644 --- a/frontend/src/components/RecipeCard.tsx +++ b/frontend/src/components/RecipeCard.tsx @@ -1,18 +1,12 @@ -/** - * RecipeCard - Displays a single recipe in the list view - */ - import { Link } from 'react-router-dom'; import type { Recipe, Tag } from '../types/recipe'; +import { colors, radius, shadows } from '../theme'; interface RecipeCardProps { recipe: Recipe; tags?: Tag[]; } -/** - * Format time in minutes to readable string - */ function formatTime(minutes?: number): string { if (!minutes) return ''; if (minutes < 60) return `${minutes}m`; @@ -21,9 +15,6 @@ function formatTime(minutes?: number): string { return mins > 0 ? `${hours}h ${mins}m` : `${hours}h`; } -/** - * Format date timestamp to readable string - */ function formatDate(timestamp?: number): string { if (!timestamp) return ''; const date = new Date(timestamp * 1000); @@ -36,29 +27,23 @@ export function RecipeCard({ recipe, tags = [] }: RecipeCardProps) { return ( -
- {recipe.description} -
- )} + {recipe.description &&{recipe.description}
} {/* Tags */} {tags.length > 0 && ( -- Browse and search your recipe collection -
+Browse and search your recipe collection
- Error: {error} -
+Error: {error}
Loading recipes...
+Loading recipes...
- {searchQuery - ? 'Try a different search term' - : 'Get started by adding your first recipe'} -
+{searchQuery + ? 'Try a different search term' + : 'Get started by adding your first recipe.'}
{!searchQuery && ( - - Add Your First Recipe - + Add Your First Recipe )}