-
- {data.name}
-
+ {type === "quizzes" ? (
+ <>
+
+
+ {showTopics && (
+
+ {categories}
+
+ )}
+ >
+ ) : (
+
+ {data.name}
+
+ )}
+
From class: {data.class.name}
diff --git a/src/components/quizzes/QuizViewer.tsx b/src/components/quizzes/QuizViewer.tsx
index 90f55f0..583f3f3 100644
--- a/src/components/quizzes/QuizViewer.tsx
+++ b/src/components/quizzes/QuizViewer.tsx
@@ -47,7 +47,6 @@ export function QuizViewer({ quiz, retakeIds, isShared = false, onFinished }: Qu
const [loading, setLoading] = useState(true);
const [resultsData, setResultsData] = useState
(null);
- const [showTopics, setShowTopics] = useState(false);
// Initialize session
useEffect(() => {
@@ -268,35 +267,9 @@ export function QuizViewer({ quiz, retakeIds, isShared = false, onFinished }: Qu
return Question not found.
;
}
- const categories = Array.from(new Set(quiz.questions.map(q => q.category.toUpperCase()))).join(" · ");
-
return (
- {/* Title & Meta */}
-
-
-
- {showTopics && (
-
- {categories}
-
- )}
-
-
{/* Main Unified Card */}