Add campaign name to the sending page

[MAILPOET-5646]
This commit is contained in:
Rostislav Wolny
2023-12-20 15:18:27 +01:00
committed by Aschepikov
parent d54847ce83
commit 267e3c550e
3 changed files with 16 additions and 0 deletions

View File

@@ -16,6 +16,16 @@
}
.mailpoet-form-send-email {
.mailpoet-send-campaign-name {
margin-bottom: -$grid-gap-large;
margin-top: $grid-gap-xl;
h1 {
font-size: $heading-font-size-h0;
font-weight: 600;
}
}
.mailpoet-form-grid {
grid-template-columns: $grid-column $grid-column;
max-width: 976px;

View File

@@ -25,6 +25,7 @@ export enum NewsletterOptionGroup {
}
export type NewsLetter = {
campaign_name: string | null;
body: {
blockDefaults: unknown;
content: unknown;

View File

@@ -811,6 +811,11 @@ class NewsletterSendComponent extends Component<
automationId="newsletter_send_heading"
/>
<ErrorBoundary>
{this.state.item.campaign_name ? (
<div className="mailpoet-form-grid mailpoet-send-campaign-name">
<h1>{this.state.item.campaign_name}</h1>
</div>
) : null}
<SendContext.Provider value={this.state.sendContextValue}>
<Form
id="mailpoet_newsletter"