Improve Patch CTA copy
Signed-off-by: Erik Engervall <erik.engervall@gmail.com>
This commit is contained in:
@@ -40,24 +40,32 @@ export const Patch = ({
|
||||
releaseBranch,
|
||||
onSuccess,
|
||||
}: PatchProps) => {
|
||||
const ctaMessage = `Patch Release ${
|
||||
latestRelease?.prerelease ? 'Candidate' : 'Version'
|
||||
}`;
|
||||
|
||||
return (
|
||||
<InfoCardPlus>
|
||||
<Box marginBottom={2}>
|
||||
<Typography variant="h4">
|
||||
Patch Release {latestRelease?.prerelease ? 'Candidate' : 'Version'}
|
||||
</Typography>
|
||||
<Typography variant="h4">{ctaMessage}</Typography>
|
||||
</Box>
|
||||
|
||||
<BodyWrapper
|
||||
latestRelease={latestRelease}
|
||||
releaseBranch={releaseBranch}
|
||||
onSuccess={onSuccess}
|
||||
ctaMessage={ctaMessage}
|
||||
/>
|
||||
</InfoCardPlus>
|
||||
);
|
||||
};
|
||||
|
||||
function BodyWrapper({ latestRelease, releaseBranch, onSuccess }: PatchProps) {
|
||||
function BodyWrapper({
|
||||
latestRelease,
|
||||
releaseBranch,
|
||||
onSuccess,
|
||||
ctaMessage,
|
||||
}: PatchProps & { ctaMessage: string }) {
|
||||
const { project } = useProjectContext();
|
||||
|
||||
if (latestRelease === null) {
|
||||
@@ -93,6 +101,7 @@ function BodyWrapper({ latestRelease, releaseBranch, onSuccess }: PatchProps) {
|
||||
releaseBranch={releaseBranch}
|
||||
onSuccess={onSuccess}
|
||||
tagParts={bumpedTag.tagParts}
|
||||
ctaMessage={ctaMessage}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ interface PatchBodyProps {
|
||||
releaseBranch: GetBranchResult['branch'];
|
||||
onSuccess?: ComponentConfig<PatchOnSuccessArgs>['onSuccess'];
|
||||
tagParts: NonNullable<CalverTagParts | SemverTagParts>;
|
||||
ctaMessage: string;
|
||||
}
|
||||
|
||||
export const PatchBody = ({
|
||||
@@ -66,6 +67,7 @@ export const PatchBody = ({
|
||||
releaseBranch,
|
||||
onSuccess,
|
||||
tagParts,
|
||||
ctaMessage,
|
||||
}: PatchBodyProps) => {
|
||||
const pluginApiClient = useApi(gitReleaseManagerApiRef);
|
||||
const { project } = useProjectContext();
|
||||
@@ -106,7 +108,7 @@ export const PatchBody = ({
|
||||
<ResponseStepDialog
|
||||
progress={progress}
|
||||
responseSteps={responseSteps}
|
||||
title="Patch Release Candidate"
|
||||
title={ctaMessage}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -320,7 +322,7 @@ export const PatchBody = ({
|
||||
run(selectedPatchCommit);
|
||||
}}
|
||||
>
|
||||
Patch Release Candidate
|
||||
{ctaMessage}
|
||||
</Button>
|
||||
</Box>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user