diff --git a/services/frontend/src/components/tarot/TarotTable.tsx b/services/frontend/src/components/tarot/TarotTable.tsx index 102ecff..6ec3f0f 100644 --- a/services/frontend/src/components/tarot/TarotTable.tsx +++ b/services/frontend/src/components/tarot/TarotTable.tsx @@ -50,10 +50,12 @@ export function TarotTable({ const [spread, setSpread] = useState("trinity"); const [topic, setTopic] = useState("general"); const [question, setQuestion] = useState(""); - const [phase, setPhase] = useState("setup"); + // A reading still being written is shown on the table, not the form for a new one. + const inProgress = initialReadings.find((r) => r.status === "pending" || r.status === "running") ?? null; + const [phase, setPhase] = useState(inProgress ? "done" : "setup"); const [picked, setPicked] = useState([]); - const [current, setCurrent] = useState(null); - const [revealed, setRevealed] = useState(0); + const [current, setCurrent] = useState(inProgress); + const [revealed, setRevealed] = useState(inProgress?.cards.length ?? 0); const [error, setError] = useState(null); const [buying, setBuying] = useState(false); @@ -243,7 +245,9 @@ export function TarotTable({ ? "A lapok…" : "A kirakásod"} - {question.trim() &&

„{question.trim()}”

} + {(current ? current.question : question.trim()) && ( +

„{current ? current.question : question.trim()}”

+ )}

{phase === "picking" && `Hangolódj a kérdésedre, és válassz ösztönösen. ${picked.length}/${chosen.cards}`} @@ -265,9 +269,11 @@ export function TarotTable({ <>

- + {!writing && ( + + )} Külön oldalon