Conditionally render back button in QuizRunner
This commit is contained in:
@@ -475,9 +475,11 @@ export default function QuizRunner({ defaultMode = 'all', defaultEntryId, autoSt
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="quiz-actions">
|
<div className="quiz-actions">
|
||||||
<button className="button button--ghost" onClick={goPrev} disabled={currentIndex === 0}>
|
{currentIndex > 0 && (
|
||||||
Back
|
<button className="button button--ghost" onClick={goPrev}>
|
||||||
</button>
|
Back
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
{!showResult ? (
|
{!showResult ? (
|
||||||
<>
|
<>
|
||||||
<button className="button" onClick={() => handleSubmit(false)}>
|
<button className="button" onClick={() => handleSubmit(false)}>
|
||||||
|
|||||||
Reference in New Issue
Block a user