Skip to content

Commit

Permalink
fix: limit Carousel nodes as per CMS sync limit (#633)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyEPhipps authored Mar 13, 2024
1 parent f8b93af commit 84e0301
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 67 deletions.
21 changes: 0 additions & 21 deletions src/components/Organisms/WYMDCarousel/WYMDCarousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,27 +209,6 @@ WYMDCarousel.propTypes = {
url: PropTypes.string
})
}),
node10Amount: PropTypes.string,
node10Copy: PropTypes.string,
node10Image: PropTypes.shape({
file: PropTypes.shape({
url: PropTypes.string
})
}),
node11Amount: PropTypes.string,
node11Copy: PropTypes.string,
node11Image: PropTypes.shape({
file: PropTypes.shape({
url: PropTypes.string
})
}),
node12Amount: PropTypes.string,
node12Copy: PropTypes.string,
node12Image: PropTypes.shape({
file: PropTypes.shape({
url: PropTypes.string
})
}),
autoPlay: PropTypes.bool.isRequired,
headerCopy: PropTypes.string.isRequired,
peopleHelpedText: PropTypes.string.isRequired,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Organisms/WYMDCarousel/_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const formatItems = thisData => {
const allValidNodes = [];

// Set at a Content Type field level, so doesn't need to be dynamic:
const possibleNumberOfNodes = 12;
const possibleNumberOfNodes = 9;

// Grab ALL keys from our raw data:
const theseKeys = Object.keys(thisData);
Expand Down
48 changes: 3 additions & 45 deletions src/styleguide/data/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,27 +120,6 @@ const carouselItemsComplete = {
file: {
url: '//images.ctfassets.net/zsfivwzfgl3t/45yv3H0XZsvsySHtutQ8vb/1fb6d1afe4037c7dccde743a747f6b4f/Test-Carousel-Icon.png'
}
},
node10Copy: 'children and young people in the UK and around the world, including with safe homes, good nutrition and access to quality healthcare and education.',
node10Amount: '10,000',
node10Image: {
file: {
url: '//images.ctfassets.net/zsfivwzfgl3t/45yv3H0XZsvsySHtutQ8vb/1fb6d1afe4037c7dccde743a747f6b4f/Test-Carousel-Icon.png'
}
},
node11Copy: 'children and young people in the UK and around the world, including with safe homes, good nutrition and access to quality healthcare and education.',
node11Amount: '11,000',
node11Image: {
file: {
url: '//images.ctfassets.net/zsfivwzfgl3t/45yv3H0XZsvsySHtutQ8vb/1fb6d1afe4037c7dccde743a747f6b4f/Test-Carousel-Icon.png'
}
},
node12Copy: 'children and young people in the UK and around the world, including with safe homes, good nutrition and access to quality healthcare and education.750,000',
node12Amount: '12,000',
node12Image: {
file: {
url: '//images.ctfassets.net/zsfivwzfgl3t/45yv3H0XZsvsySHtutQ8vb/1fb6d1afe4037c7dccde743a747f6b4f/Test-Carousel-Icon.png'
}
}
};

Expand Down Expand Up @@ -200,30 +179,9 @@ const carouselItemsIncomplete = {
url: '//images.ctfassets.net/zsfivwzfgl3t/45yv3H0XZsvsySHtutQ8vb/1fb6d1afe4037c7dccde743a747f6b4f/Test-Carousel-Icon.png'
}
},
node9Copy: 'children and young people in the UK and around the world, including with safe homes, good nutrition and access to quality healthcare and education.',
node9Amount: null,
node9Image: null,
node10Copy: null,
node10Amount: '10,000',
node10Image: {
file: {
url: '//images.ctfassets.net/zsfivwzfgl3t/45yv3H0XZsvsySHtutQ8vb/1fb6d1afe4037c7dccde743a747f6b4f/Test-Carousel-Icon.png'
}
},
node11Copy: 'children and young people in the UK and around the world, including with safe homes, good nutrition and access to quality healthcare and education.',
node11Amount: '11,000',
node11Image: {
file: {
url: '//images.ctfassets.net/zsfivwzfgl3t/45yv3H0XZsvsySHtutQ8vb/1fb6d1afe4037c7dccde743a747f6b4f/Test-Carousel-Icon.png'
}
},
node12Copy: 'children and young people in the UK and around the world, including with safe homes, good nutrition and access to quality healthcare and education.750,000',
node12Amount: null,
node12Image: {
file: {
url: '//images.ctfassets.net/zsfivwzfgl3t/45yv3H0XZsvsySHtutQ8vb/1fb6d1afe4037c7dccde743a747f6b4f/Test-Carousel-Icon.png'
}
}
node9_Copy: 'children and young people in the UK and around the world, including with safe homes, good nutrition and access to quality healthcare and education.',
node9_Amount: null,
node9_Image: null
};

const carouselItemsMinimal = {
Expand Down

0 comments on commit 84e0301

Please sign in to comment.