From 515bc8499055fb62c588b2f7de0fb5008997a709 Mon Sep 17 00:00:00 2001 From: Elijah Date: Sun, 28 Jun 2026 08:49:57 -0700 Subject: [PATCH] fix: Update shuffle icon to crossed arrows and dismiss toast on card flip --- src/components/flashcards/FlashcardViewer.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/flashcards/FlashcardViewer.tsx b/src/components/flashcards/FlashcardViewer.tsx index 0b19e76..5cea588 100644 --- a/src/components/flashcards/FlashcardViewer.tsx +++ b/src/components/flashcards/FlashcardViewer.tsx @@ -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"} > - - + +