We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When the trivia game ends, <GameOver /> is rendered, but <TriviaQuiz /> still persists.
<GameOver />
<TriviaQuiz />
Components
App
GameOver
TriviaQuiz
Only <GameOver /> should render in the application's current state as there is no need for <TriviaQuiz /> once the game ends.
In the App component, we can fix the ternary JSX expression using the following code block:
{!gameOver ? ( !startTrivia ? ( <TriviaSetup topic={topic} setTopic={setTopic} questionCount={questionCount} setQuestionCount={setQuestionCount} generateQuiz={generateQuiz} /> ) : ( <TriviaQuiz currentQuestionIndex={currentQuestionIndex} setCurrentQuestionIndex={setCurrentQuestionIndex} questions={questions} setGameOver={setGameOver} /> ) ) : ( <GameOver /> )}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug Description
When the trivia game ends,
<GameOver />
is rendered, but<TriviaQuiz />
still persists.How to Reproduce
Components
tab.App
,GameOver
, andTriviaQuiz
, pictured below.Expected Behavior
Only
<GameOver />
should render in the application's current state as there is no need for<TriviaQuiz />
once the game ends.Solution
In the
App
component, we can fix the ternary JSX expression using the following code block:The text was updated successfully, but these errors were encountered: