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

Code before:
  tests: Test[];
  isSignedIn: boolean;
}
export function IndependentLowerJaw({
  openHelpModal,
  openResetModal,
  executeChallenge,
  submitChallenge,
  tests,
  isSignedIn
}: IndependentLowerJawProps): JSX.Element {
  console.log(isSignedIn, 'isSignedIn in IndependentLowerJaw');
  const { t } = useTranslation();
  const firstFailedTest = tests.find(test => !!test.err);
  const hint = firstFailedTest?.message;
  const [showHint, setShowHint] = React.useState(false);
  const [showSubmissionHint, setShowSubmissionHint] = React.useState(true);

  const isChallengeComplete = tests.every(test => test.pass);

  React.useEffect(() => {
    setShowHint(!!hint);
  }, [hint]);

  const isMacOS = navigator.userAgent.includes('Mac OS');
  const checkButtonText = isMacOS ? t('⌘ + Enter') : t('ctrl-enter');

  return (
    <div className='independent-lower-jaw' tabIndex={-1}>
      {showHint && hint && (
        <div className='hint-container'>
          <div dangerouslySetInnerHTML={{ __html: hint }} />
          <button className={'tooltip'} onClick={() => setShowHint(false)}>
            ×<span className='tooltiptext'> {t('buttons.close')}</span>
          </button>
        </div>
      )}
      {isChallengeComplete && showSubmissionHint && (
        <div className='hint-container'>
          <div>
            <p>{t('learn.congratulations-code-passes')}</p>
            {!isSignedIn && (
              <a
                href={`${apiLocation}/signin`}
                className='btn-cta btn btn-block'
                onClick={() => {
                  callGA({
                    event: 'sign_in'
                  });
                }}
              >

Review comment (suggestion):
This looks like it was changed

```suggestion
  const checkButtonText = isMacOS ? t('command-enter') : t('ctrl-enter');
```

Code after:
  tests: Test[];
  isSignedIn: boolean;
}
export function IndependentLowerJaw({
  openHelpModal,
  openResetModal,
  executeChallenge,
  submitChallenge,
  tests,
  isSignedIn
}: IndependentLowerJawProps): JSX.Element {
  const { t } = useTranslation();
  const firstFailedTest = tests.find(test => !!test.err);
  const hint = firstFailedTest?.message;
  const [showHint, setShowHint] = React.useState(false);
  const [showSubmissionHint, setShowSubmissionHint] = React.useState(true);

  const isChallengeComplete = tests.every(test => test.pass);

  React.useEffect(() => {
    setShowHint(!!hint);
  }, [hint]);

  const isMacOS = navigator.userAgent.includes('Mac OS');
  const checkButtonText = isMacOS ? t('command-enter') : t('ctrl-enter');

  return (
    <div className='independent-lower-jaw' tabIndex={-1}>
      {showHint && hint && (
        <div className='hint-container'>
          <div dangerouslySetInnerHTML={{ __html: hint }} />
          <button className={'tooltip'} onClick={() => setShowHint(false)}>
            ×<span className='tooltiptext'> {t('buttons.close')}</span>
          </button>
        </div>
      )}
      {isChallengeComplete && showSubmissionHint && (
        <div className='hint-container'>
          <div>
            <p>{t('learn.congratulations-code-passes')}</p>
            {!isSignedIn && (
              <a
                href={`${apiLocation}/signin`}
                className='btn-cta btn btn-block'
                onClick={() => {
                  callGA({
                    event: 'sign_in'
                  });
                }}
              >
                {t('learn.sign-in-save')}