Add migrations troubleshooting guide
This commit is contained in:
@@ -20,6 +20,8 @@ export default function ContestantView() {
|
||||
const [categories, setCategories] = useState([]);
|
||||
const [currentTurnTeamId, setCurrentTurnTeamId] = useState(null);
|
||||
const [currentTurnTeamName, setCurrentTurnTeamName] = useState(null);
|
||||
const [questionIndex, setQuestionIndex] = useState(0);
|
||||
const [totalQuestions, setTotalQuestions] = useState(0);
|
||||
|
||||
useEffect(() => {
|
||||
// Load initial game state
|
||||
@@ -100,11 +102,14 @@ export default function ContestantView() {
|
||||
console.log("Game started:", data);
|
||||
setGameName(data.game_name);
|
||||
setGameStartTime(new Date());
|
||||
setTotalQuestions(data.total_questions);
|
||||
});
|
||||
|
||||
socket.on("question_changed", (data) => {
|
||||
console.log("Question changed:", data);
|
||||
setCurrentQuestion(data.question);
|
||||
setQuestionIndex(data.question_index);
|
||||
setTotalQuestions(data.total_questions);
|
||||
setShowAnswer(false); // Hide answer when question changes
|
||||
setAnswer("");
|
||||
setTimerSeconds(30);
|
||||
@@ -339,6 +344,17 @@ export default function ContestantView() {
|
||||
/>
|
||||
</div>
|
||||
|
||||
{totalQuestions > 0 && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: "1.5rem",
|
||||
color: "#999",
|
||||
marginBottom: "1rem",
|
||||
}}
|
||||
>
|
||||
Question {questionIndex + 1} of {totalQuestions}
|
||||
</div>
|
||||
)}
|
||||
{currentQuestion.category && (
|
||||
<div
|
||||
style={{
|
||||
|
||||
Reference in New Issue
Block a user