mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-10-30 14:49:14 +00:00
35 lines
1.1 KiB
TypeScript
35 lines
1.1 KiB
TypeScript
import {Alert} from 'sentry/components/alert';
|
|
import Link from 'sentry/components/links/link';
|
|
import {tct} from 'sentry/locale';
|
|
import {useLocation} from 'sentry/utils/useLocation';
|
|
import {crashReportTypes} from 'sentry/views/issueDetails/groupEventAttachments/groupEventAttachmentsFilter';
|
|
|
|
type Props = {
|
|
groupId: string;
|
|
orgSlug: string;
|
|
projectSlug: string;
|
|
};
|
|
|
|
function EventAttachmentsCrashReportsNotice({orgSlug, projectSlug, groupId}: Props) {
|
|
const location = useLocation();
|
|
const settingsUrl = `/settings/${orgSlug}/projects/${projectSlug}/security-and-privacy/`;
|
|
const attachmentsUrl = {
|
|
pathname: `/organizations/${orgSlug}/issues/${groupId}/attachments/`,
|
|
query: {...location.query, types: crashReportTypes},
|
|
};
|
|
|
|
return (
|
|
<Alert type="info" showIcon>
|
|
{tct(
|
|
'Your limit of stored crash reports has been reached for this issue. [attachmentsLink: View crashes] or [settingsLink: configure limit].',
|
|
{
|
|
attachmentsLink: <Link to={attachmentsUrl} />,
|
|
settingsLink: <Link to={settingsUrl} />,
|
|
}
|
|
)}
|
|
</Alert>
|
|
);
|
|
}
|
|
|
|
export default EventAttachmentsCrashReportsNotice;
|