mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 05:31:14 -05:00
feat: Implement full Phase 3 API optimizations
This commit is contained in:
@@ -31,7 +31,50 @@ export const queryKeys = {
|
||||
closingSoonRides: () => ['homepage', 'closing-soon-rides'] as const,
|
||||
recentlyClosedParks: () => ['homepage', 'recently-closed-parks'] as const,
|
||||
recentlyClosedRides: () => ['homepage', 'recently-closed-rides'] as const,
|
||||
featuredParks: {
|
||||
topRated: () => ['homepage', 'featured-parks', 'top-rated'] as const,
|
||||
mostRides: () => ['homepage', 'featured-parks', 'most-rides'] as const,
|
||||
},
|
||||
},
|
||||
|
||||
// Add more query keys as needed
|
||||
// Parks queries
|
||||
parks: {
|
||||
all: () => ['parks', 'all'] as const,
|
||||
detail: (slug: string) => ['parks', 'detail', slug] as const,
|
||||
rides: (parkId: string) => ['parks', 'rides', parkId] as const,
|
||||
},
|
||||
|
||||
// Rides queries
|
||||
rides: {
|
||||
all: () => ['rides', 'all'] as const,
|
||||
detail: (parkSlug: string, rideSlug: string) => ['rides', 'detail', parkSlug, rideSlug] as const,
|
||||
similar: (parkId: string, category: string, currentId: string) =>
|
||||
['rides', 'similar', parkId, category, currentId] as const,
|
||||
},
|
||||
|
||||
// Reviews queries
|
||||
reviews: {
|
||||
entity: (entityType: 'park' | 'ride', entityId: string) =>
|
||||
['reviews', entityType, entityId] as const,
|
||||
user: (userId: string, filter: string, sortBy: string) =>
|
||||
['reviews', 'user', userId, filter, sortBy] as const,
|
||||
},
|
||||
|
||||
// Photos queries
|
||||
photos: {
|
||||
entity: (entityType: string, entityId: string) =>
|
||||
['photos', entityType, entityId] as const,
|
||||
count: (entityType: string, entityId: string) =>
|
||||
['photos', 'count', entityType, entityId] as const,
|
||||
},
|
||||
|
||||
// Search queries
|
||||
search: {
|
||||
global: (query: string) => ['search', 'global', query] as const,
|
||||
},
|
||||
|
||||
// Lists queries
|
||||
lists: {
|
||||
items: (listId: string) => ['list-items', listId] as const,
|
||||
},
|
||||
} as const;
|
||||
|
||||
Reference in New Issue
Block a user