eventAttachmentsCrashReportsNotice.tsx 1.1 KB

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