diff --git a/static/app/views/alerts/list/rules/index.tsx b/static/app/views/alerts/list/rules/index.tsx index be6e6ad3862744..86a68e781a553a 100644 --- a/static/app/views/alerts/list/rules/index.tsx +++ b/static/app/views/alerts/list/rules/index.tsx @@ -1,6 +1,7 @@ import {Component} from 'react'; import {RouteComponentProps} from 'react-router'; import styled from '@emotion/styled'; +import uniq from 'lodash/uniq'; import {addErrorMessage, addMessage} from 'sentry/actionCreators/indicator'; import AsyncComponent from 'sentry/components/asyncComponent'; @@ -13,6 +14,7 @@ import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle'; import {IconArrow} from 'sentry/icons'; import {t} from 'sentry/locale'; import {Organization, PageFilters, Project} from 'sentry/types'; +import {defined} from 'sentry/utils'; import trackAdvancedAnalyticsEvent from 'sentry/utils/analytics/trackAdvancedAnalyticsEvent'; import Projects from 'sentry/utils/projects'; import Teams from 'sentry/utils/teams'; @@ -31,7 +33,7 @@ type Props = RouteComponentProps<{}, {}> & { }; type State = { - ruleList?: CombinedMetricIssueAlerts[] | null; + ruleList?: Array | null; teamFilterSearch?: string; }; @@ -58,12 +60,6 @@ class AlertRulesList extends AsyncComponent projects).flat())]; - } - handleChangeFilter = (activeFilters: string[]) => { const {router, location} = this.props; const {cursor: _cursor, page: _page, ...currentQuery} = location.query; @@ -133,9 +129,11 @@ class AlertRulesList extends AsyncComponent projects)); const sort: { asc: boolean; @@ -209,12 +207,12 @@ class AlertRulesList extends AsyncComponent - + {({initiallyLoaded, projects}) => - ruleList?.map(rule => ( + ruleList.map(rule => (