Skip to content

Commit

Permalink
Merge pull request #349 from guardian/ei/fix-capi-multiple-paidfor-va…
Browse files Browse the repository at this point in the history
…riable-name

Update SeriesUrl variable name to match format
  • Loading branch information
emma-imber authored Jan 9, 2024
2 parents c2a9123 + 1034e4f commit b5aeebf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/templates/csr/capi-multiple-paidfor/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import Resizer from '$templates/components/Resizer.svelte';
import { retrieveCapiData, addHeadlineKicker } from '$lib/capiMultiple';
export let SeriesUrl: GAMVariable;
export let SeriesURL: GAMVariable;
export let ComponentTitle: GAMVariable;
export let Article1Headline: GAMVariable;
export let Article1Image: GAMVariable;
Expand Down Expand Up @@ -60,7 +60,7 @@
},
];
const getCards = retrieveCapiData(cardOverrides, SeriesUrl).then((response) =>
const getCards = retrieveCapiData(cardOverrides, SeriesURL).then((response) =>
addHeadlineKicker(cardOverrides, response.articles),
);
Expand All @@ -70,14 +70,14 @@
</script>

{#await getCards}
<h3>Loading Content for “{SeriesUrl}”</h3>
<h3>Loading Content for “{SeriesURL}”</h3>
{:then cards}
{#if cards[0]}
<aside bind:clientHeight={height}>
<PaidForHeader
edition={cards[0].branding.edition}
{ComponentTitle}
{SeriesUrl}
SeriesUrl={SeriesURL}
templateType="multiple"
/>
<div class="body">
Expand All @@ -94,7 +94,7 @@
<Resizer {height} />
{/if}
{:catch}
<h3>Could not fetch series “{SeriesUrl}”</h3>
<h3>Could not fetch series “{SeriesURL}”</h3>
{/await}

<style>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/csr/capi-multiple-paidfor/test.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"SeriesUrl": "renting-reinvented",
"SeriesURL": "renting-reinvented",
"ComponentTitle": "Renting Reinvented",
"Article1Headline": "Then, now and tomorrow – in pictures",
"Article1Image": "",
Expand Down

0 comments on commit b5aeebf

Please sign in to comment.