novo fix
This commit is contained in:
1 parent
822ee2d557
commit
ad0025ef84
7 files changed
+173
-106
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { useAllStructures } from "../hooks/useStructures.js";
|
||||
import { useSystemStructures } from "../hooks/useSystemStructures.js";
|
||||
import { useAtlasStore } from "../store/useAtlasStore.js";
|
||||
import { Scene } from "../components/viewer/Scene.js";
|
||||
import { LayerToggle } from "../components/LayerToggle.js";
|
||||
import { ClippingControls } from "../components/ClippingControls.js";
|
||||
@@ -6,7 +7,8 @@ import { SearchNav } from "../components/SearchNav.js";
|
||||
import { StructureInfoPanel } from "../components/StructureInfoPanel.js";
|
||||
|
||||
export default function AtlasPage() {
|
||||
const { structures, bySlug } = useAllStructures();
|
||||
const visibleSystems = useAtlasStore((s) => s.visibleSystems);
|
||||
const { bySlug } = useSystemStructures(visibleSystems);
|
||||
|
||||
return (
|
||||
<div className="h-full grid grid-cols-[280px_1fr_320px]">
|
||||
@@ -14,7 +16,7 @@ export default function AtlasPage() {
|
||||
<LayerToggle />
|
||||
<ClippingControls />
|
||||
<div className="flex-1 min-h-0 mt-4">
|
||||
<SearchNav structures={structures} />
|
||||
<SearchNav />
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user