diff --git a/src/components/Notifications/SilenceNotificationsList.tsx b/src/components/Notifications/SilenceNotificationsList.tsx index 35a64836c..369b7a995 100644 --- a/src/components/Notifications/SilenceNotificationsList.tsx +++ b/src/components/Notifications/SilenceNotificationsList.tsx @@ -235,7 +235,7 @@ export default function SilenceNotificationsList({ const selectedNotificationSilenceId = searchParams.get("id") ?? undefined; - const { data: selectedNotificationSilence } = useQuery({ + const { data: selectedNotificationSilence, refetch } = useQuery({ queryKey: ["notification_silences", selectedNotificationSilenceId], enabled: !!selectedNotificationSilenceId, queryFn: async () => @@ -264,9 +264,11 @@ export default function SilenceNotificationsList({ searchParams.delete("id"); setSearchParams(searchParams); refresh(); + refetch(); }} onClose={() => { searchParams.delete("id"); + refetch(); setSearchParams(searchParams); }} data={selectedNotificationSilence}