Merge pull request #5114 from jakemcdermott/hide-revision-copy-button-sometimes

Hide revision copy button when there's no revision

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2019-10-25 16:21:14 +00:00 committed by GitHub
commit 9eda4efb74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,11 +105,13 @@ class ProjectListItem extends React.Component {
</DataListCell>,
<DataListCell key="revision">
{project.scm_revision.substring(0, 7)}
<ClipboardCopyButton
stringToCopy={project.scm_revision}
hoverTip={i18n._(t`Copy full revision to clipboard.`)}
clickTip={i18n._(t`Successfully copied to clipboard!`)}
/>
{project.scm_revision ? (
<ClipboardCopyButton
stringToCopy={project.scm_revision}
hoverTip={i18n._(t`Copy full revision to clipboard.`)}
clickTip={i18n._(t`Successfully copied to clipboard!`)}
/>
) : null}
</DataListCell>,
<DataListCell lastcolumn="true" key="action">
{project.summary_fields.user_capabilities.start && (