Implement type safety and JSONB elimination

This commit is contained in:
gpt-engineer-app[bot]
2025-10-17 13:29:22 +00:00
parent efc33a7dda
commit d54b8a9ae4
10 changed files with 144 additions and 69 deletions

View File

@@ -188,8 +188,11 @@ export function RideCreditsManager({ userId }: RideCreditsManagerProps) {
if (error) throw error;
// Type assertion for complex joined data
const newCredit = data as unknown as UserRideCredit;
// Add to existing array
setCredits(prev => [...prev, data as any]);
setCredits(prev => [...prev, newCredit]);
setIsAddDialogOpen(false);
} catch (error) {
console.error('Error fetching new credit:', error);