Repository: freeCodeCamp/freeCodeCamp
File: client/src/templates/Challenges/classic/lower-jaw.tsx (TypeScript)

Code before:
      setTestFeedbackHeight(testFeedbackRef.current.clientHeight);
    }
    // Every render could change the shape of the jaw, so this effect will let
    // monaco know it might need to resize
    updateContainer();
  });

  const isAttemptsLargerThanTest =
    currentAttempts &&
    testsLength &&
    (currentAttempts >= testsLength || currentAttempts >= 3);

  const isDesktop = window.innerWidth > MAX_MOBILE_WIDTH;
  const isMacOS = navigator.userAgent.includes('Mac OS');

  const checkButtonText = isDesktop
    ? isMacOS
      ? t('buttons.check-code-3')
      : t('buttons.check-code')
    : t('buttons.check-code-2');

  const submitButtonText = isDesktop
    ? isMacOS
      ? t('buttons.submit-and-go-3')
      : t('buttons.submit-and-go')
    : t('buttons.submit-and-go-2');

  const showSignInButton = !isSignedIn && challengeIsCompleted;

  return (
    <div className='action-row-container'>
      {showSignInButton && (
        <>
          <a
            href={`${apiLocation}/signin`}
            className='btn-cta btn btn-block'
            onClick={() => {
              callGA({
                event: 'sign_in'
              });
            }}
          >
            {t('learn.sign-in-save')}
          </a>
          <Spacer size='xxSmall' />
        </>
      )}
      <Button
        data-playwright-test-label='lowerJaw-submit-button'
        block
        onClick={tryToSubmitChallenge}

Review comment (suggestion):
```suggestion
      : t('buttons.submit-and-go-2')
    : t('buttons.submit-and-go');
```

Sorry, the properties are apparently switched for the submit button text.

I might open a PR after this is merged to give them better names and make sure the default is consistent.

Code after:
      setTestFeedbackHeight(testFeedbackRef.current.clientHeight);
    }
    // Every render could change the shape of the jaw, so this effect will let
    // monaco know it might need to resize
    updateContainer();
  });

  const isAttemptsLargerThanTest =
    currentAttempts &&
    testsLength &&
    (currentAttempts >= testsLength || currentAttempts >= 3);

  const isDesktop = window.innerWidth > MAX_MOBILE_WIDTH;
  const isMacOS = navigator.userAgent.includes('Mac OS');

  const checkButtonText = isDesktop
    ? isMacOS
      ? t('buttons.check-code-3')
      : t('buttons.check-code')
    : t('buttons.check-code-2');

  const submitButtonText = isDesktop
    ? isMacOS
      ? t('buttons.submit-and-go-3')
      : t('buttons.submit-and-go-2')
    : t('buttons.submit-and-go');

  const showSignInButton = !isSignedIn && challengeIsCompleted;

  return (
    <div className='action-row-container'>
      {showSignInButton && (
        <>
          <a
            href={`${apiLocation}/signin`}
            className='btn-cta btn btn-block'
            onClick={() => {
              callGA({
                event: 'sign_in'
              });
            }}
          >
            {t('learn.sign-in-save')}
          </a>
          <Spacer size='xxSmall' />
        </>
      )}
      <Button
        data-playwright-test-label='lowerJaw-submit-button'
        block
        onClick={tryToSubmitChallenge}