Fix minor enhancement opportunities

This commit is contained in:
gpt-engineer-app[bot]
2025-10-30 23:47:14 +00:00
parent b4ecc8ef13
commit 8f4110d890
3 changed files with 33 additions and 47 deletions

View File

@@ -28,7 +28,7 @@ export function useHomepageRecentChanges(enabled = true) {
if (error) throw error;
// Transform the database response to match our interface
return (data || []).map((item: any) => ({
return (data || []).map((item: any): RecentChange => ({
id: item.entity_id,
name: item.entity_name,
type: item.entity_type as 'park' | 'ride' | 'company',
@@ -42,7 +42,7 @@ export function useHomepageRecentChanges(enabled = true) {
avatarUrl: item.changed_by_avatar || undefined
} : undefined,
changeReason: item.change_reason || undefined
})) as RecentChange[];
}));
},
enabled,
staleTime: 5 * 60 * 1000,