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

@@ -2,6 +2,7 @@
import { useMutation, useQueryClient } from '@tanstack/react-query';
import * as apiClient from '../../services/apiClient';
import { notifySuccess, notifyError } from '../../services/notificationService';
import { queryKeyBases } from '../../config/queryKeys';
interface DeleteShoppingListParams {
listId: number;
@@ -48,7 +49,7 @@ export const useDeleteShoppingListMutation = () => {
},
onSuccess: () => {
// Invalidate and refetch shopping lists to get the updated list
queryClient.invalidateQueries({ queryKey: ['shopping-lists'] });
queryClient.invalidateQueries({ queryKey: queryKeyBases.shoppingLists });
notifySuccess('Shopping list deleted');
},
onError: (error: Error) => {