unlinkedAlert.tsx 934 B

123456789101112131415161718192021222324252627282930
  1. import styled from '@emotion/styled';
  2. import {Alert} from 'sentry/components/alert';
  3. import {t} from 'sentry/locale';
  4. import type {OrganizationSummary} from 'sentry/types';
  5. type Props = {
  6. organizations: OrganizationSummary[];
  7. };
  8. function UnlinkedAlert({organizations}: Props) {
  9. return (
  10. <StyledAlert type="warning" showIcon>
  11. {t(
  12. 'You\'ve selected Slack as your delivery method, but do not have a linked account for the following organizations. You\'ll receive email notifications instead until you type "/sentry link" into your Slack workspace to link your account. If slash commands are not working, please re-install the Slack integration.'
  13. )}
  14. <ul>
  15. {organizations.map(organization => (
  16. <li key={organization.id}>{organization.slug}</li>
  17. ))}
  18. </ul>
  19. </StyledAlert>
  20. );
  21. }
  22. const StyledAlert = styled(Alert)`
  23. margin: 20px 0px;
  24. `;
  25. export default UnlinkedAlert;