eventAttachmentsCrashReportsNotice.tsx 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import {Location} from 'history';
  2. import {tct} from 'sentry/locale';
  3. import {crashReportTypes} from 'sentry/views/organizationGroupDetails/groupEventAttachments/groupEventAttachmentsFilter';
  4. import Alert from '../alert';
  5. import Link from '../links/link';
  6. type Props = {
  7. groupId: string;
  8. location: Location;
  9. orgSlug: string;
  10. projectSlug: string;
  11. };
  12. const EventAttachmentsCrashReportsNotice = ({
  13. orgSlug,
  14. projectSlug,
  15. location,
  16. groupId,
  17. }: Props) => {
  18. const settingsUrl = `/settings/${orgSlug}/projects/${projectSlug}/security-and-privacy/`;
  19. const attachmentsUrl = {
  20. pathname: `/organizations/${orgSlug}/issues/${groupId}/attachments/`,
  21. query: {...location.query, types: crashReportTypes},
  22. };
  23. return (
  24. <Alert type="info" showIcon>
  25. {tct(
  26. 'Your limit of stored crash reports has been reached for this issue. [attachmentsLink: View crashes] or [settingsLink: configure limit].',
  27. {
  28. attachmentsLink: <Link to={attachmentsUrl} />,
  29. settingsLink: <Link to={settingsUrl} />,
  30. }
  31. )}
  32. </Alert>
  33. );
  34. };
  35. export default EventAttachmentsCrashReportsNotice;