Skip to content

Commit

Permalink
factorize
Browse files Browse the repository at this point in the history
  • Loading branch information
Florent Mariotti committed Jan 10, 2025
1 parent 07239d8 commit 627192f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions frontend/src/components/Preview-modal/PreviewModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ export const PreviewModal: FC = () => {
};

const isLastCardInBoard = (): boolean => {
const cards = board.isLayoutFree() ? board.cards : initialCards;
return activeCard === cards[cards.length - 1];
return activeCard === initialCards[initialCards.length - 1];
};

const handleKeyNavigation = useCallback(
Expand Down

0 comments on commit 627192f

Please sign in to comment.