Skip to content

Commit

Permalink
fix: fix not refetching on update
Browse files Browse the repository at this point in the history
  • Loading branch information
mainawycliffe authored and moshloop committed Oct 29, 2024
1 parent 15730d8 commit b06ee99
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Notifications/SilenceNotificationsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 () =>
Expand Down Expand Up @@ -264,9 +264,11 @@ export default function SilenceNotificationsList({
searchParams.delete("id");
setSearchParams(searchParams);
refresh();
refetch();
}}
onClose={() => {
searchParams.delete("id");
refetch();
setSearchParams(searchParams);
}}
data={selectedNotificationSilence}
Expand Down

0 comments on commit b06ee99

Please sign in to comment.