reinstallAlert.tsx 640 B

12345678910111213141516171819202122
  1. import {Alert} from 'sentry/components/alert';
  2. import {t} from 'sentry/locale';
  3. import type {Integration} from 'sentry/types/integrations';
  4. import {getIntegrationStatus} from 'sentry/utils/integrationUtil';
  5. type Props = {
  6. integrations: Integration[] | null;
  7. };
  8. function ReinstallAlert({integrations = []}: Props) {
  9. const statusList = integrations?.map(getIntegrationStatus);
  10. if (statusList?.includes('disabled')) {
  11. return (
  12. <Alert data-test-id="disabled-alert" type="warning" showIcon>
  13. {t('Reinstall required for disabled integrations.')}
  14. </Alert>
  15. );
  16. }
  17. return null;
  18. }
  19. export default ReinstallAlert;