Repository: freeCodeCamp/freeCodeCamp
File: client/src/client-only-routes/show-project-links.tsx (TypeScript)

Code before:
    } else if (certName == 'Foundational C# with Microsoft') {
      return 'certification.project.heading-exam';
    } else {
      return 'certification.project.heading';
    }
  };

  const challengeData: CompletedChallenge | null = completedChallenge
    ? {
        ...completedChallenge,
        // // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
        challengeFiles:
          completedChallenge?.challengeFiles?.map(regeneratePathAndHistory) ??
          null
      }
    : null;

  const isCertName = (maybeCertName: string): maybeCertName is CertTitle => {
    if (maybeCertName === 'Legacy Full Stack') return true;
    return maybeCertName in certsToProjects;
  };
  if (!isCertName(certName)) return <div> Unknown Certification</div>;

  return (
    <div data-cy='solution-widget' data-playwright-test-label='project-links'>
      {t(getCertHanding(certName), { user: name })}
      <Spacer size='medium' />
      <Table striped>
        <thead>
          <tr>
            <th>
              <span className='sr-only'>{t('settings.headings.certs')}</span>
            </th>
          </tr>
        </thead>
        <tbody>
          <ProjectsFor certName={certName} />
        </tbody>
      </Table>
      <Spacer size='medium' />
      <ProjectModal
        challengeFiles={completedChallenge?.challengeFiles ?? null}
        handleSolutionModalHide={handleSolutionModalHide}
        isOpen={showCode}
        projectTitle={projectTitle}
        // 'solution' is theoretically never 'null', if it a JsAlgoData cert
        // which is the only time we use the modal
        solution={completedChallenge?.solution as undefined | string}
      />
      <ProjectPreviewModal
        challengeData={challengeData}

Review comment (suggestion):
```suggestion
      {t(getCertHeading(certName), { user: name })}
```

Code after:
    } else if (certName == 'Foundational C# with Microsoft') {
      return 'certification.project.heading-exam';
    } else {
      return 'certification.project.heading';
    }
  };

  const challengeData: CompletedChallenge | null = completedChallenge
    ? {
        ...completedChallenge,
        // // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
        challengeFiles:
          completedChallenge?.challengeFiles?.map(regeneratePathAndHistory) ??
          null
      }
    : null;

  const isCertName = (maybeCertName: string): maybeCertName is CertTitle => {
    if (maybeCertName === 'Legacy Full Stack') return true;
    return maybeCertName in certsToProjects;
  };
  if (!isCertName(certName)) return <div> Unknown Certification</div>;

  return (
    <div data-cy='solution-widget' data-playwright-test-label='project-links'>
      {t(getCertHeading(certName), { user: name })}
      <Spacer size='medium' />
      <Table striped>
        <thead>
          <tr>
            <th>
              <span className='sr-only'>{t('settings.headings.certs')}</span>
            </th>
          </tr>
        </thead>
        <tbody>
          <ProjectsFor certName={certName} />
        </tbody>
      </Table>
      <Spacer size='medium' />
      <ProjectModal
        challengeFiles={completedChallenge?.challengeFiles ?? null}
        handleSolutionModalHide={handleSolutionModalHide}
        isOpen={showCode}
        projectTitle={projectTitle}
        // 'solution' is theoretically never 'null', if it a JsAlgoData cert
        // which is the only time we use the modal
        solution={completedChallenge?.solution as undefined | string}
      />
      <ProjectPreviewModal
        challengeData={challengeData}