Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes carousel bug #199

Merged
merged 2 commits into from
Nov 17, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/components/newscarousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'slick-carousel/slick/slick-theme.css';
import Image from "next/image";

const PrevArrow = ({ currentSlide, slideCount, ...props }) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise, you could de-structure the onClick method here itself! Thank you!

const { onClick } = props
return (
<svg
xmlns='http://www.w3.org/2000/svg'
Expand All @@ -13,6 +14,7 @@ const PrevArrow = ({ currentSlide, slideCount, ...props }) => {
fill='#000'
className='bi bi-arrow-left-short align-self-center'
viewBox='0 0 16 16'
onClick={onClick}
>
<path
fillRule='evenodd'
Expand All @@ -23,6 +25,7 @@ const PrevArrow = ({ currentSlide, slideCount, ...props }) => {
};

const NextArrow = ({ currentSlide, slideCount, ...props }) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could simply de-structure the onClick method here itself! Thank you!

const { onClick } = props
return (
<svg
xmlns='http://www.w3.org/2000/svg'
Expand All @@ -31,6 +34,7 @@ const NextArrow = ({ currentSlide, slideCount, ...props }) => {
fill='#000'
className='bi bi-arrow-left-short align-self-center'
viewBox='0 0 16 16'
onClick={onClick}
>
<path
fillRule='evenodd'
Expand Down