mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 23:31:12 -05:00
Implement type safety and JSONB elimination
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user