Skip to content

Commit

Permalink
Remove unnecessary invalidateQueries command
Browse files Browse the repository at this point in the history
  • Loading branch information
charliepark committed Sep 10, 2024
1 parent 93bcef9 commit 4a74c77
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions app/forms/ip-pool-edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@ export function EditIpPoolSideModalForm() {
queryClient.invalidateQueries('ipPoolList')
navigate(pb.ipPool({ pool: updatedPool.name }))
addToast({ content: 'Your IP pool has been updated' })

// Only invalidate if we're staying on the same page. If the name
// _has_ changed, invalidating ipPoolView causes an error page to flash
// while the loader for the target page is running because the current
// page's pool gets cleared out while we're still on the page. If we're
// navigating to a different page, its query will fetch anew regardless.
if (pool.name === updatedPool.name) {
queryClient.invalidateQueries('ipPoolView')
}
},
})

Expand Down

0 comments on commit 4a74c77

Please sign in to comment.