Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/evanss2025/site
Browse files Browse the repository at this point in the history
  • Loading branch information
evanss2025 committed Sep 3, 2024
2 parents b3f33bc + d372770 commit e58d225
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/congressional-app-challenge/carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ const Carousel = ({ cards }) => {
const scrollContainerRef = useRef(null);
const cardsPerView = 1; // Number of cards that can be seen at once
const cardWidth = 400; // Width of each card in pixels
const scrollAmount = cardsPerView * cardWidth; // Total scroll width for each move
const scrollAmount = cardWidth; // Total scroll width for each move
const totalCards = cards.length;

// Made another one of cards to do infinite scrolling
// Made another set of cards to do infinite scrolling
const infiniteCards = [...cards, ...cards, ...cards]; // Repeat the cards 3x for non-choppy scrolling

// Fixes scroll position to the middle set the mount for non-choppy scrolling
Expand Down

0 comments on commit e58d225

Please sign in to comment.