Skip to content

Commit

Permalink
ui: improve the typing for useAlerts
Browse files Browse the repository at this point in the history
  • Loading branch information
ChengYanJin committed Sep 13, 2023
1 parent e2b4b14 commit 6759877
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ui/src/containers/AlertProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ import {
FederatedComponent,
} from '@scality/module-federation';
import { STATUS_HEALTH } from '../constants';
import { QueryObserverResult } from 'react-query';
export type Status = 'healthy' | 'warning' | 'critical';

const alertGlobal = {};
export const useAlerts = (filters: FilterLabels) => {
export const useAlerts = (
filters: FilterLabels,
): Omit<QueryObserverResult<Alert[]>, 'data'> & { alerts?: Alert[] } => {
return alertGlobal.hooks.useAlerts(filters);
};
export const useHighestSeverityAlerts = (filters: FilterLabels) => {
Expand Down

0 comments on commit 6759877

Please sign in to comment.