import Link from 'sentry/components/links/link'; import Tag from 'sentry/components/tag'; import {IconOpen} from 'sentry/icons'; import {t} from 'sentry/locale'; import {Deploy} from 'sentry/types'; import {MutableSearch} from 'sentry/utils/tokenizeSearch'; type Props = { deploy: Deploy; className?: string; orgSlug?: string; projectId?: number; version?: string; }; const DeployBadge = ({deploy, orgSlug, projectId, version, className}: Props) => { const shouldLinkToIssues = !!orgSlug && !!version; const badge = ( } textMaxWidth={80} tooltipText={shouldLinkToIssues ? t('Open In Issues') : undefined} > {deploy.environment} ); if (!shouldLinkToIssues) { return badge; } return ( {badge} ); }; export default DeployBadge;