fix error build

This commit is contained in:
hamid zarghami
2025-12-20 14:55:58 +03:30
parent 3c20231a97
commit a4ccc78dd5
2 changed files with 4 additions and 2 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+3 -1
View File
@@ -66,7 +66,9 @@ function FoodPage({ }: Props) {
: Array.isArray(foodData.images) && foodData.images.length > 0
? typeof foodData.images[0] === 'string'
? foodData.images[0]
: foodData.images[0]?.url
: typeof foodData.images[0] === 'object' && foodData.images[0] !== null && 'url' in foodData.images[0]
? (foodData.images[0] as { url: string }).url
: '/assets/images/food-preview-hq.png'
: '/assets/images/food-preview-hq.png';
const categoryName = foodData.category?.title;
const prepareTime = foodData.prepareTime || 0;