From cdc2deba2bfa7ffb6277690984db394398cae128 Mon Sep 17 00:00:00 2001 From: vasucp1207 Date: Wed, 16 Nov 2022 07:51:36 +0000 Subject: [PATCH 1/2] fixing the custom arrows --- app/components/newscarousel.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/components/newscarousel.js b/app/components/newscarousel.js index 0fa13a55..460c8c94 100644 --- a/app/components/newscarousel.js +++ b/app/components/newscarousel.js @@ -5,6 +5,7 @@ import 'slick-carousel/slick/slick-theme.css'; import Image from "next/image"; const PrevArrow = ({ currentSlide, slideCount, ...props }) => { + const { onClick } = props return ( { fill='#000' className='bi bi-arrow-left-short align-self-center' viewBox='0 0 16 16' + onClick={onClick} > { }; const NextArrow = ({ currentSlide, slideCount, ...props }) => { + const { onClick } = props return ( { fill='#000' className='bi bi-arrow-left-short align-self-center' viewBox='0 0 16 16' + onClick={onClick} > Date: Wed, 16 Nov 2022 15:18:45 +0000 Subject: [PATCH 2/2] fixes carousel bug --- app/components/newscarousel.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/components/newscarousel.js b/app/components/newscarousel.js index 460c8c94..486132bf 100644 --- a/app/components/newscarousel.js +++ b/app/components/newscarousel.js @@ -4,8 +4,7 @@ import 'slick-carousel/slick/slick.css'; import 'slick-carousel/slick/slick-theme.css'; import Image from "next/image"; -const PrevArrow = ({ currentSlide, slideCount, ...props }) => { - const { onClick } = props +const PrevArrow = ({ currentSlide, slideCount, onClick, ...props }) => { return ( { ); }; -const NextArrow = ({ currentSlide, slideCount, ...props }) => { - const { onClick } = props +const NextArrow = ({ currentSlide, slideCount, onClick, ...props }) => { return (