Skip to content

Commit 1e8ac6c

Browse files
gcp-cherry-pick-bot[bot]BrunoQuaresmamatifali
authored
fix: don't show promote button for members (cherry-pick #17511) (#17513)
Co-authored-by: Bruno Quaresma <bruno@coder.com> Co-authored-by: M Atif Ali <atif@coder.com> fix: don't show promote button for members (#17511) Fix #15850
1 parent b8ffc29 commit 1e8ac6c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

site/src/pages/TemplatePage/TemplateVersionsPage/VersionRow.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export const VersionRow: FC<VersionRowProps> = ({
3333
});
3434

3535
const jobStatus = version.job.status;
36-
const showActions = onPromoteClick || onArchiveClick;
3736

3837
return (
3938
<TimelineEntry
@@ -106,7 +105,7 @@ export const VersionRow: FC<VersionRowProps> = ({
106105
</Pill>
107106
)}
108107

109-
{showActions && jobStatus === "failed" ? (
108+
{jobStatus === "failed" && onArchiveClick && (
110109
<Button
111110
css={styles.promoteButton}
112111
disabled={isActive || version.archived}
@@ -118,7 +117,9 @@ export const VersionRow: FC<VersionRowProps> = ({
118117
>
119118
Archive&hellip;
120119
</Button>
121-
) : (
120+
)}
121+
122+
{jobStatus === "succeeded" && onPromoteClick && (
122123
<Button
123124
css={styles.promoteButton}
124125
disabled={isActive || jobStatus !== "succeeded"}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy