Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/app/components/body-units/body-units.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ type CTAData = {
alignment: string;
heading: string;
description: string;
button_href: string;
button_text: string;
buttonHref: string;
buttonText: string;
};

function CTA({data}: {data: CTAData}) {
Expand All @@ -28,8 +28,8 @@ function CTA({data}: {data: CTAData}) {
<div className={`blog-cta ${alignment}`}>
<h2>{data.heading}</h2>
<div>{data.description}</div>
<a className="btn primary" href={data.button_href}>
{data.button_text}
<a className="btn primary" href={data.buttonHref}>
{data.buttonText}
</a>
</div>
);
Expand Down
5 changes: 2 additions & 3 deletions test/src/components/body-units.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,15 @@ describe('body-units', () => {
screen.getByText('terrible mistake', {exact: false});
});
it('handles CTA', () => {
/* eslint-disable camelcase */
const unit: UnitType = {
id: 'meh',
type: 'blog_cta',
value: {
alignment: 'left',
heading: 'Heading',
description: 'description text',
button_href: '#',
button_text: 'click me'
buttonHref: '#',
buttonText: 'click me'
}
};

Expand Down
4 changes: 2 additions & 2 deletions test/src/data/article-page-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ export default {
alignment: 'left',
heading: 'Heading',
description: 'description text',
button_href: '#',
button_text: 'click me'
buttonHref: '#',
buttonText: 'click me'
}
},
{
Expand Down