fix(graph): show script in header (#26034)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<img width="771" alt="Screenshot 2024-05-24 at 3 48 22 PM"
src="https://github.com/nrwl/nx/assets/16211801/11ad5526-8449-4b9f-9e02-296903855dd5">

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
This commit is contained in:
Emily Xiong 2024-05-27 10:36:09 -04:00 committed by GitHub
parent aa2519ff62
commit e0450f7969
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,6 +17,10 @@ export function TargetExecutor({
isCompact,
link,
}: TargetExecutorProps) {
if (script) {
return link ? <ExternalLink href={link}>{script}</ExternalLink> : script;
}
if (commands) {
if (isCompact) {
return link ? (
@ -40,7 +44,7 @@ export function TargetExecutor({
);
}
const displayText = command ?? script ?? executor ?? '';
const displayText = command ?? executor ?? '';
return link ? (
<ExternalLink href={link}>{displayText}</ExternalLink>
) : (