mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 17:51:14 -05:00
Fix edge function logging and types
This commit is contained in:
@@ -362,23 +362,24 @@ export function ContentTabs() {
|
||||
</div>
|
||||
) : openingSoon.length > 0 ? (
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 xl:grid-cols-6 2xl:grid-cols-7 3xl:grid-cols-8 gap-4 lg:gap-5 xl:gap-4 2xl:gap-5">
|
||||
{openingSoon.map((entity: any) => (
|
||||
entity.entityType === 'park' ? (
|
||||
<div key={entity.id} className="relative">
|
||||
<ParkCard park={entity} />
|
||||
{openingSoon.map((entity: unknown) => {
|
||||
const typedEntity = entity as { id: string; entityType: string; opening_date: string };
|
||||
return typedEntity.entityType === 'park' ? (
|
||||
<div key={typedEntity.id} className="relative">
|
||||
<ParkCard park={entity as never} />
|
||||
<Badge className="absolute top-2 right-2 bg-blue-500/90 text-white backdrop-blur-sm">
|
||||
{new Date(entity.opening_date).toLocaleDateString('en-US', { month: 'short', year: 'numeric' })}
|
||||
{new Date(typedEntity.opening_date).toLocaleDateString('en-US', { month: 'short', year: 'numeric' })}
|
||||
</Badge>
|
||||
</div>
|
||||
) : (
|
||||
<div key={entity.id} className="relative">
|
||||
<RideCard ride={entity} />
|
||||
<div key={typedEntity.id} className="relative">
|
||||
<RideCard ride={entity as never} />
|
||||
<Badge className="absolute top-2 right-2 bg-blue-500/90 text-white backdrop-blur-sm">
|
||||
{new Date(entity.opening_date).toLocaleDateString('en-US', { month: 'short', year: 'numeric' })}
|
||||
{new Date(typedEntity.opening_date).toLocaleDateString('en-US', { month: 'short', year: 'numeric' })}
|
||||
</Badge>
|
||||
</div>
|
||||
)
|
||||
))}
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
) : (
|
||||
<div className="text-center py-12 text-muted-foreground">
|
||||
@@ -401,23 +402,24 @@ export function ContentTabs() {
|
||||
</div>
|
||||
) : closingSoon.length > 0 ? (
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 xl:grid-cols-6 2xl:grid-cols-7 3xl:grid-cols-8 gap-4 lg:gap-5 xl:gap-4 2xl:gap-5">
|
||||
{closingSoon.map((entity: any) => (
|
||||
entity.entityType === 'park' ? (
|
||||
<div key={entity.id} className="relative">
|
||||
<ParkCard park={entity} />
|
||||
{closingSoon.map((entity: unknown) => {
|
||||
const typedEntity = entity as { id: string; entityType: string; closing_date: string };
|
||||
return typedEntity.entityType === 'park' ? (
|
||||
<div key={typedEntity.id} className="relative">
|
||||
<ParkCard park={entity as never} />
|
||||
<Badge className="absolute top-2 right-2 bg-red-500/90 text-white backdrop-blur-sm">
|
||||
Closes {new Date(entity.closing_date).toLocaleDateString('en-US', { month: 'short', year: 'numeric' })}
|
||||
Closes {new Date(typedEntity.closing_date).toLocaleDateString('en-US', { month: 'short', year: 'numeric' })}
|
||||
</Badge>
|
||||
</div>
|
||||
) : (
|
||||
<div key={entity.id} className="relative">
|
||||
<RideCard ride={entity} />
|
||||
<div key={typedEntity.id} className="relative">
|
||||
<RideCard ride={entity as never} />
|
||||
<Badge className="absolute top-2 right-2 bg-red-500/90 text-white backdrop-blur-sm">
|
||||
Closes {new Date(entity.closing_date).toLocaleDateString('en-US', { month: 'short', year: 'numeric' })}
|
||||
Closes {new Date(typedEntity.closing_date).toLocaleDateString('en-US', { month: 'short', year: 'numeric' })}
|
||||
</Badge>
|
||||
</div>
|
||||
)
|
||||
))}
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
) : (
|
||||
<div className="text-center py-12 text-muted-foreground">
|
||||
@@ -440,23 +442,24 @@ export function ContentTabs() {
|
||||
</div>
|
||||
) : recentlyClosed.length > 0 ? (
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 xl:grid-cols-6 2xl:grid-cols-7 3xl:grid-cols-8 gap-4 lg:gap-5 xl:gap-4 2xl:gap-5">
|
||||
{recentlyClosed.map((entity: any) => (
|
||||
entity.entityType === 'park' ? (
|
||||
<div key={entity.id} className="relative">
|
||||
<ParkCard park={entity} />
|
||||
{recentlyClosed.map((entity: unknown) => {
|
||||
const typedEntity = entity as { id: string; entityType: string; closing_date: string };
|
||||
return typedEntity.entityType === 'park' ? (
|
||||
<div key={typedEntity.id} className="relative">
|
||||
<ParkCard park={entity as never} />
|
||||
<Badge className="absolute top-2 right-2 bg-gray-500/90 text-white backdrop-blur-sm">
|
||||
Closed {new Date(entity.closing_date).getFullYear()}
|
||||
Closed {new Date(typedEntity.closing_date).getFullYear()}
|
||||
</Badge>
|
||||
</div>
|
||||
) : (
|
||||
<div key={entity.id} className="relative">
|
||||
<RideCard ride={entity} />
|
||||
<div key={typedEntity.id} className="relative">
|
||||
<RideCard ride={entity as never} />
|
||||
<Badge className="absolute top-2 right-2 bg-gray-500/90 text-white backdrop-blur-sm">
|
||||
Closed {new Date(entity.closing_date).getFullYear()}
|
||||
Closed {new Date(typedEntity.closing_date).getFullYear()}
|
||||
</Badge>
|
||||
</div>
|
||||
)
|
||||
))}
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
) : (
|
||||
<div className="text-center py-12 text-muted-foreground">
|
||||
|
||||
Reference in New Issue
Block a user