Skip to content

Commit

Permalink
fix: carousel slide number
Browse files Browse the repository at this point in the history
  • Loading branch information
eleanorreem committed Dec 16, 2024
1 parent 85daa94 commit 90b4463
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions components/storyblok/StoryblokCarousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,8 @@ const StoryblokCarousel = (props: StoryblokCarouselProps) => {
const isMobileScreen = useMediaQuery(siteTheme.breakpoints.down('sm'));

const getSlideWidth = () => {
if (isMobileScreen) {
return numberSlidesToWidthMap[number_mobile_slides || 1];
}
const slideNumber = isMobileScreen ? number_mobile_slides || 1 : number_desktop_slides || 1;
return numberSlidesToWidthMap[slideNumber];
};

return (
Expand Down

0 comments on commit 90b4463

Please sign in to comment.