Skip to content

Commit

Permalink
Message when no questions generated
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtan2000 committed Aug 27, 2024
1 parent c289325 commit c1fff61
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/(main)/quiz/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ const QuizPage: React.FC = () => {
<div style={{ display: 'flex', alignItems: 'center' }}>
<h5>Quizzes</h5>
<Fragment>
<Button icon="pi pi-times" text style={{ marginLeft: 'auto' }} onClick={() => setVisible(true)} visible={isQuizOngoing} />
<Button icon="pi pi-times" style={{ marginLeft: 'auto' }} onClick={() => setVisible(true)} visible={isQuizOngoing} />
</Fragment>
<Dialog
header="Exit Quiz"
Expand All @@ -266,6 +266,9 @@ const QuizPage: React.FC = () => {
Are you sure you want to exit the quiz?
</Dialog>
</div>
{quiz && Array.isArray(quiz.mcqs) && quiz.mcqs.length === 0 && (
<div>No questions generated.</div>
)}
{!isQuizOngoing && (
<div>
<br />
Expand Down

0 comments on commit c1fff61

Please sign in to comment.