mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-08 12:04:29 -05:00
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 button
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user