feat: show reset button after submitting the code once (#47126)
* feat: shows reset after checking code once * fix: changed conditions to hide and show help buttonpull/47160/head
parent
b1a0ecf6c6
commit
4e55be35bd
|
@ -188,9 +188,9 @@ const LowerJaw = ({
|
|||
const isAttemptsLargerThanTest =
|
||||
attemptsNumber &&
|
||||
testsLength &&
|
||||
(attemptsNumber >= testsLength || attemptsNumber > 3);
|
||||
(attemptsNumber >= testsLength || attemptsNumber >= 3);
|
||||
|
||||
if (isAttemptsLargerThanTest && !earliestAvailableCompletion)
|
||||
if (isAttemptsLargerThanTest && !earliestAvailableCompletion) {
|
||||
return (
|
||||
<div>
|
||||
<hr />
|
||||
|
@ -206,6 +206,16 @@ const LowerJaw = ({
|
|||
</button>
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<div>
|
||||
<hr />
|
||||
<button className='btn-block btn fade-in' onClick={openResetModal}>
|
||||
{t('learn.editor-tabs.restart-step')}
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
const showDesktopButton = window.innerWidth > MAX_MOBILE_WIDTH;
|
||||
|
|
Loading…
Reference in New Issue