diff --git a/src/app/(protected)/[classSlug]/flashcards/page.tsx b/src/app/(protected)/[classSlug]/flashcards/page.tsx index 21f2fdb..5bd7ab7 100644 --- a/src/app/(protected)/[classSlug]/flashcards/page.tsx +++ b/src/app/(protected)/[classSlug]/flashcards/page.tsx @@ -99,9 +99,10 @@ function SortableDeckCard({ deck, onEdit, onDelete, classSlug }: any) { )} -
- {deck.progress?.length ? ( - <> +
+
+ {deck.progress?.length ? ( + <> Continue @@ -119,23 +120,26 @@ function SortableDeckCard({ deck, onEdit, onDelete, classSlug }: any) { > Restart - - ) : ( - - Study - - )} - - - + + ) : ( + + Study + + )} +
+
+ + + +
diff --git a/src/app/(protected)/[classSlug]/quizzes/page.tsx b/src/app/(protected)/[classSlug]/quizzes/page.tsx index d007514..7a09211 100644 --- a/src/app/(protected)/[classSlug]/quizzes/page.tsx +++ b/src/app/(protected)/[classSlug]/quizzes/page.tsx @@ -35,6 +35,12 @@ interface QuizItem { groupId: string | null; sortOrder: number; _count: { questions: number; attempts: number }; + progress: Array<{ + mode: string; + currentIndex: number; + orderJson: string; + answersJson: string | null; + }>; } interface MaterialGroup { @@ -79,21 +85,48 @@ function SortableQuizCard({ quiz, onEdit, onDelete, classSlug }: any) { )} -
- - Start Quiz - - - - +
+
+ {quiz.progress?.length ? ( + <> + + Continue + + + + ) : ( + + Start Quiz + + )} +
+
+ + + +
diff --git a/src/components/quizzes/QuizViewer.tsx b/src/components/quizzes/QuizViewer.tsx index ac2bd97..d269ec4 100644 --- a/src/components/quizzes/QuizViewer.tsx +++ b/src/components/quizzes/QuizViewer.tsx @@ -350,11 +350,11 @@ export function QuizViewer({ quiz, retakeIds, isShared = false, onFinished }: Qu
{/* Tags */} -
- +
+ {currentQ.category} - + {currentQ.type === "MULTIPLE_CHOICE" ? "Multiple Choice" : "Select All That Apply"}
@@ -382,7 +382,7 @@ export function QuizViewer({ quiz, retakeIds, isShared = false, onFinished }: Qu } else if (!isSelected && opt.isCorrect) { stateClass = "border-success/50 bg-success/5 text-text-heading"; rightIcon = ( -
+
@@ -400,7 +400,7 @@ export function QuizViewer({ quiz, retakeIds, isShared = false, onFinished }: Qu
toggleOption(opt.id)} - className={`flex min-h-14 items-center gap-4 rounded-2xl border px-4 py-4 transition-all duration-200 md:px-5 ${stateClass}`} + className={`grid min-h-14 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-4 gap-y-2 rounded-2xl border px-4 py-4 transition-all duration-200 md:flex md:gap-4 md:px-5 ${stateClass}`} >
{rightIcon && ( -
+
{rightIcon}
)}