1
0
mirror of https://github.com/quay/quay.git synced 2026-01-26 06:21:37 +03:00

fix(web): use template literals for Fetch Tag pull commands (PROJQUAY-9952) (#4699)

ClipboardCopy children were passed as JSX expressions which creates an
array of React nodes. PatternFly's ClipboardCopy may join array children
with commas when extracting text, causing pull commands like:
"docker pull ,hostname,/,org,/,repo,:,tag"

Using template literals ensures a single string child is passed,
preventing the comma issue.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
jbpratt
2025-12-09 05:59:43 -06:00
committed by GitHub
parent b0cc36b78e
commit d04f98dbcd

View File

@@ -28,7 +28,7 @@ export default function TablePopover(props: TablePopoverProps) {
hoverTip="Copy"
clickTip="Copied"
>
podman pull {domain}/{props.org}/{props.repo}:{props.tag}
{`podman pull ${domain}/${props.org}/${props.repo}:${props.tag}`}
</ClipboardCopy>
<br />
<Text style={{fontWeight: 'bold'}}>Podman Pull (By Digest)</Text>
@@ -38,7 +38,7 @@ export default function TablePopover(props: TablePopoverProps) {
hoverTip="Copy"
clickTip="Copied"
>
podman pull {domain}/{props.org}/{props.repo}@{props.digest}
{`podman pull ${domain}/${props.org}/${props.repo}@${props.digest}`}
</ClipboardCopy>
<br />
<Text style={{fontWeight: 'bold'}}>Docker Pull (By Tag)</Text>
@@ -48,7 +48,7 @@ export default function TablePopover(props: TablePopoverProps) {
hoverTip="Copy"
clickTip="Copied"
>
docker pull {domain}/{props.org}/{props.repo}:{props.tag}
{`docker pull ${domain}/${props.org}/${props.repo}:${props.tag}`}
</ClipboardCopy>
<br />
<Text style={{fontWeight: 'bold'}}>Docker Pull (By Digest)</Text>
@@ -58,7 +58,7 @@ export default function TablePopover(props: TablePopoverProps) {
hoverTip="Copy"
clickTip="Copied"
>
docker pull {domain}/{props.org}/{props.repo}@{props.digest}
{`docker pull ${domain}/${props.org}/${props.repo}@${props.digest}`}
</ClipboardCopy>
</div>
}