From 8e720454851b887f9209480103d501758e6e2872 Mon Sep 17 00:00:00 2001 From: Nathan Franklin Date: Wed, 4 Dec 2024 21:04:26 -0600 Subject: [PATCH] Use static string for query key --- react/src/hooks/features/useDeleteFeature.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/react/src/hooks/features/useDeleteFeature.ts b/react/src/hooks/features/useDeleteFeature.ts index 63252e86..132cf6b1 100644 --- a/react/src/hooks/features/useDeleteFeature.ts +++ b/react/src/hooks/features/useDeleteFeature.ts @@ -1,5 +1,6 @@ import { useQueryClient } from 'react-query'; import { useDelete } from '@hazmapper/requests'; +import { KEY_USE_FEATURES } from './useFeatures'; type DeleteFeatureParams = { projectId: number; @@ -15,7 +16,7 @@ export function useDeleteFeature() { options: { onSuccess: () => { // invalidate *any* feature listing query - queryClient.invalidateQueries(['activeProjectFeatures']); + queryClient.invalidateQueries([KEY_USE_FEATURES]); }, }, });