Adopt TanStack Query
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 13m46s

This commit is contained in:
2026-01-10 10:43:13 -08:00
parent 6d468544e2
commit dcd9452b8c
31 changed files with 584 additions and 157 deletions

View File

@@ -1,6 +1,7 @@
// src/hooks/queries/useBestSalePricesQuery.ts
import { useQuery } from '@tanstack/react-query';
import { fetchBestSalePrices } from '../../services/apiClient';
import { queryKeys } from '../../config/queryKeys';
import type { WatchedItemDeal } from '../../types';
/**
@@ -19,7 +20,7 @@ import type { WatchedItemDeal } from '../../types';
*/
export const useBestSalePricesQuery = (enabled: boolean = true) => {
return useQuery({
queryKey: ['best-sale-prices'],
queryKey: queryKeys.bestSalePrices(),
queryFn: async (): Promise<WatchedItemDeal[]> => {
const response = await fetchBestSalePrices();