mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-29 03:27:05 -05:00
Fix internal error
This commit is contained in:
@@ -200,7 +200,7 @@ export const EntityEditPreview = ({ submissionId, entityType, entityName }: Enti
|
||||
</Badge>
|
||||
</div>
|
||||
|
||||
{itemData?.cloudflare_image_url && typeof itemData.cloudflare_image_url === 'string' && (
|
||||
{(itemData?.cloudflare_image_url && typeof itemData.cloudflare_image_url === 'string' && (
|
||||
<Card className="overflow-hidden">
|
||||
<CardContent className="p-2">
|
||||
<img
|
||||
@@ -210,7 +210,7 @@ export const EntityEditPreview = ({ submissionId, entityType, entityName }: Enti
|
||||
/>
|
||||
</CardContent>
|
||||
</Card>
|
||||
)}
|
||||
)) as React.ReactNode}
|
||||
|
||||
{isEdit && (
|
||||
<div className="space-y-2 text-sm">
|
||||
@@ -229,12 +229,12 @@ export const EntityEditPreview = ({ submissionId, entityType, entityName }: Enti
|
||||
</div>
|
||||
)}
|
||||
|
||||
{!isEdit && itemData?.reason && typeof itemData.reason === 'string' && (
|
||||
{(!isEdit && itemData?.reason && typeof itemData.reason === 'string' && (
|
||||
<div className="text-sm">
|
||||
<span className="font-medium">Reason: </span>
|
||||
<span className="text-muted-foreground">{itemData.reason}</span>
|
||||
</div>
|
||||
)}
|
||||
)) as React.ReactNode}
|
||||
|
||||
<div className="text-xs text-muted-foreground italic">
|
||||
Click "Review Items" for full details
|
||||
@@ -244,7 +244,7 @@ export const EntityEditPreview = ({ submissionId, entityType, entityName }: Enti
|
||||
}
|
||||
|
||||
// Build photos array for modal
|
||||
const photos = [];
|
||||
const photos: Array<{ id: string; url: string; caption: string | null }> = [];
|
||||
if (bannerImageUrl) {
|
||||
photos.push({
|
||||
id: 'banner',
|
||||
@@ -336,7 +336,10 @@ export const EntityEditPreview = ({ submissionId, entityType, entityName }: Enti
|
||||
</div>
|
||||
|
||||
<PhotoModal
|
||||
photos={photos}
|
||||
photos={photos.map(photo => ({
|
||||
...photo,
|
||||
caption: photo.caption ?? undefined
|
||||
}))}
|
||||
initialIndex={selectedImageIndex}
|
||||
isOpen={isModalOpen}
|
||||
onClose={() => setIsModalOpen(false)}
|
||||
|
||||
Reference in New Issue
Block a user