fix error build
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user