mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 15:51:13 -05:00
Implement cache management
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { supabase } from '@/integrations/supabase/client';
|
||||
import { queryKeys } from '@/lib/queryKeys';
|
||||
|
||||
export interface CoasterStat {
|
||||
id: string;
|
||||
@@ -15,7 +16,7 @@ export interface CoasterStat {
|
||||
|
||||
export function useCoasterStats(rideId: string | undefined) {
|
||||
return useQuery({
|
||||
queryKey: ['coaster-stats', rideId],
|
||||
queryKey: queryKeys.stats.coaster(rideId || ''),
|
||||
queryFn: async () => {
|
||||
if (!rideId) return [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user