Skip to content

feat(site): dismiss health section warnings #11059

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Dec 6, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update comments
  • Loading branch information
BrunoQuaresma committed Dec 6, 2023
commit bf1f95a5430eb61d253787b7d8447d76f0e8087f
4 changes: 3 additions & 1 deletion site/src/pages/HealthPage/DismissWarningButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export const DismissWarningButton = (props: { healthcheck: HealthSection }) => {
const queryClient = useQueryClient();
const healthSettingsQuery = useQuery(healthSettings());
// They call the same mutation but are used in diff contexts so we don't want
// to merge their states
// to merge their states. Eg. You dismiss a warning and when it is done it
// will show the enable button but since the mutation is still invalidating
// other queries it will be in the loading state when it should be idle.
const enableMutation = useMutation(updateHealthSettings(queryClient));
const dismissMutation = useMutation(updateHealthSettings(queryClient));

Expand Down