import {Fragment} from 'react'; import styled from '@emotion/styled'; import Access from 'sentry/components/acl/access'; import Button from 'sentry/components/button'; import ButtonBar from 'sentry/components/buttonBar'; import Confirm from 'sentry/components/confirm'; import Count from 'sentry/components/count'; import DateTime from 'sentry/components/dateTime'; import Link from 'sentry/components/links/link'; import TextOverflow from 'sentry/components/textOverflow'; import Tooltip from 'sentry/components/tooltip'; import Version from 'sentry/components/version'; import {IconDelete} from 'sentry/icons'; import {t} from 'sentry/locale'; import space from 'sentry/styles/space'; import {SourceMapsArchive} from 'sentry/types'; type Props = { archive: SourceMapsArchive; onDelete: (name: string) => void; orgId: string; projectId: string; }; const SourceMapsArchiveRow = ({archive, orgId, projectId, onDelete}: Props) => { const {name, date, fileCount} = archive; const archiveLink = `/settings/${orgId}/projects/${projectId}/source-maps/${encodeURIComponent( name )}`; return ( {t('release')} {({hasAccess}) => ( onDelete(name)} message={t( 'Are you sure you want to remove all artifacts in this archive?' )} disabled={!hasAccess} >