fix: Update shuffle icon to crossed arrows and dismiss toast on card flip
All checks were successful
Automated Container Build / build-and-push (push) Successful in 56s

This commit is contained in:
Elijah 2026-06-28 08:49:57 -07:00
parent e4985d07e1
commit 515bc84990

View file

@ -128,6 +128,7 @@ export function FlashcardViewer({ cards, deckId, isShared = false, initialProgre
if (e.key === " " || e.key === "Enter" || e.key === "ArrowUp" || e.key === "ArrowDown") {
e.preventDefault();
setToastMessage(null);
setIsFlipped((prev) => {
if (!prev) setHasFlippedOnce(true);
return !prev;
@ -323,6 +324,7 @@ export function FlashcardViewer({ cards, deckId, isShared = false, initialProgre
ref={cardRef}
className={`perspective-1000 cursor-pointer select-none relative ${swipeClass}`}
onClick={() => {
setToastMessage(null);
setIsFlipped(!isFlipped);
if (!isFlipped) setHasFlippedOnce(true);
}}
@ -452,8 +454,8 @@ export function FlashcardViewer({ cards, deckId, isShared = false, initialProgre
}`}
title={isShuffled ? "Turn shuffle off" : "Turn shuffle on"}
>
<svg className={`w-5 h-5 ${isShuffled ? "stroke-[3]" : "stroke-2"}`} fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" d="M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4" />
<svg className={`w-5 h-5 ${isShuffled ? "stroke-[2.5]" : "stroke-2"}`} fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" d="M16 3h5v5M4 20L21 3M21 16v5h-5M15 15l6 6M4 4l5 5" />
</svg>
</button>