Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into fix-ncps-show-tagline
Browse files Browse the repository at this point in the history
  • Loading branch information
imbrian committed May 2, 2024
2 parents cb4ba28 + fd0b814 commit 874d837
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/hosted-buttons/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ const getHostedButtonDetailsResponse = {
name: "tagline",
value: "true",
},
{
name: "height",
value: "40",
},
],
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/hosted-buttons/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export type HostedButtonDetailsParams =
shape: string,
color: string,
label: string,
height: string,
height: ?number,
tagline: boolean,
|},
version: ?string,
Expand Down
2 changes: 1 addition & 1 deletion src/hosted-buttons/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const getHostedButtonDetails: HostedButtonDetailsParams = async ({
color: getButtonVariable(variables, "color"),
label: getButtonVariable(variables, "button_text"),
tagline: getButtonVariable(variables, "tagline") === "true",
height: getButtonVariable(variables, "height"),
height: parseInt(getButtonVariable(variables, "height"), 10) || undefined,
},
version: body.version,
buttonContainerId: body.button_container_id,
Expand Down
2 changes: 1 addition & 1 deletion src/hosted-buttons/utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe("getHostedButtonDetails", () => {
link_variables: [
{
name: "height",
value: 50,
value: "50",
},
{
name: "tagline",
Expand Down

0 comments on commit 874d837

Please sign in to comment.