move next-level-buttons on mobile

pull/118/head
Jon Eugster 3 years ago
parent 1ce68fe7fe
commit 5e4a959c8a

@ -413,7 +413,9 @@ export function CommandLineInterface(props: { world: string, level: number, data
<div className="content" ref={proofPanelRef}>
<ExerciseStatement data={props.data} />
<div className="tmp-pusher"></div>
{proof.length ? proof.map((step, i) => {
{proof.length ?
<>
{proof.map((step, i) => {
if (i == proof.length - 1 && hasInteractiveErrors(step.errors)) {
// if the last command contains an error, we only display the errors but not the
// entered command as it is still present in the command line.
@ -454,7 +456,10 @@ export function CommandLineInterface(props: { world: string, level: number, data
}
</div>
)}
{completed && i == proof.length - 1 &&
</div>
}
})}
{mobile && completed &&
<div className="button-row">
{props.level >= props.worldSize ?
<Button to={`/${gameId}`}>
@ -467,9 +472,8 @@ export function CommandLineInterface(props: { world: string, level: number, data
}
</div>
}
</div>
}
}) : <CircularProgress />}
</>
: <CircularProgress />}
</div>
<CommandLine proofPanelRef={proofPanelRef} />
</div>

Loading…
Cancel
Save