This commit is contained in:
Rodrigo Bertoldo de Sousa Martins committed 2026-09-08 12:41:59 -03:00
1 parent 822ee2d557
commit ad0025ef84
7 files changed
+173 -106

No files matched your search

+3 -2
View File
@@ -1,6 +1,6 @@
import { useEffect, useRef, useState } from "react";
import { api, type Structure, type QuizCard } from "../lib/api.js";
import { useAllStructures } from "../hooks/useStructures.js";
import { useSystemStructures } from "../hooks/useSystemStructures.js";
import { Scene } from "../components/viewer/Scene.js";
import { LayerToggle } from "../components/LayerToggle.js";
import { useAtlasStore } from "../store/useAtlasStore.js";
@@ -8,7 +8,8 @@ import { useAtlasStore } from "../store/useAtlasStore.js";
type Deck = (Structure & { quizCard: QuizCard | null })[];
export default function QuizPage() {
const { bySlug } = useAllStructures();
const visibleSystems = useAtlasStore((s) => s.visibleSystems);
const { bySlug } = useSystemStructures(visibleSystems);
const [deck, setDeck] = useState<Deck>([]);
const [index, setIndex] = useState(0);
const [feedback, setFeedback] = useState<"correct" | "wrong" | null>(null);