Fix: Resolve TypeScript errors in pages

This commit is contained in:
gpt-engineer-app[bot]
2025-11-03 02:59:07 +00:00
parent 88403f04f5
commit 3c13b7a9f4
8 changed files with 57 additions and 55 deletions

View File

@@ -63,7 +63,7 @@ const Operators = () => {
.from('parks')
.select('operator_id')
.not('operator_id', 'is', null)
.then(({ data }) => data?.map(park => park.operator_id) || [])
.then(({ data }) => data?.map(park => park.operator_id).filter((id): id is string => id !== null) || [])
)
.order('name');
@@ -84,7 +84,7 @@ const Operators = () => {
await submitCompanyCreation(
data,
'operator',
user.id
user!.id
);
toast({
@@ -186,8 +186,8 @@ const Operators = () => {
useOpenGraph({
title: 'Park Operators - ThrillWiki',
description: `Browse ${filteredAndSortedOperators.length} theme park operators worldwide`,
imageUrl: filteredAndSortedOperators[0]?.banner_image_url,
imageId: filteredAndSortedOperators[0]?.banner_image_id,
imageUrl: filteredAndSortedOperators[0]?.banner_image_url ?? undefined,
imageId: filteredAndSortedOperators[0]?.banner_image_id ?? undefined,
type: 'website',
enabled: !isLoading
});