diff --git a/src/app/(protected)/[classSlug]/flashcards/[deckId]/page.tsx b/src/app/(protected)/[classSlug]/flashcards/[deckId]/page.tsx index e116238..0cd1472 100644 --- a/src/app/(protected)/[classSlug]/flashcards/[deckId]/page.tsx +++ b/src/app/(protected)/[classSlug]/flashcards/[deckId]/page.tsx @@ -92,7 +92,7 @@ export default function DeckStudyPage() { return (
{/* Header */} -
+
+
+
+ + {type === "flashcards" ? ( + + ) : ( + + )} +
+ ); +} diff --git a/src/app/shared/[classSlug]/[type]/[token]/page.tsx b/src/app/shared/[classSlug]/[type]/[token]/page.tsx index cfe8614..ef870f2 100644 --- a/src/app/shared/[classSlug]/[type]/[token]/page.tsx +++ b/src/app/shared/[classSlug]/[type]/[token]/page.tsx @@ -1,9 +1,8 @@ import { getShareLink } from "@/services/shareService"; import { notFound } from "next/navigation"; -import { FlashcardViewer } from "@/components/flashcards/FlashcardViewer"; -import { QuizViewer } from "@/components/quizzes/QuizViewer"; import { ThemeToggle } from "@/components/ui/ThemeToggle"; import Link from "next/link"; +import { SharedViewer } from "./SharedViewer"; interface SharedPageProps { params: Promise<{ @@ -52,7 +51,7 @@ export default async function SharedPage(props: SharedPageProps) {
- + Read Only
-
-

- {link.deck ? link.deck.name : link.quizSet?.name} -

-

- From class: {link.deck ? link.deck.class.name : link.quizSet?.class.name} -

-
- - {type === "flashcards" && link.deck && ( - - )} - - {type === "quizzes" && link.quizSet && ( - - )} +
diff --git a/src/components/flashcards/FlashcardViewer.tsx b/src/components/flashcards/FlashcardViewer.tsx index 5cea588..7667cd7 100644 --- a/src/components/flashcards/FlashcardViewer.tsx +++ b/src/components/flashcards/FlashcardViewer.tsx @@ -146,7 +146,7 @@ export function FlashcardViewer({ cards, deckId, isShared = false, initialProgre // Touch handlers for swipe function handleTouchStart(e: React.TouchEvent) { - if (!isFlipped) return; + if (!hasFlippedOnce) return; dragRef.current = { startX: e.touches[0].clientX, currentX: e.touches[0].clientX, @@ -350,7 +350,7 @@ export function FlashcardViewer({ cards, deckId, isShared = false, initialProgre

- Tap or press Space to flip + Tap or press Space to flip