diff --git a/frontend/packages/data-portal/app/components/Layout/AboutAndHelpDropdown.tsx b/frontend/packages/data-portal/app/components/Layout/AboutAndHelpDropdown.tsx index 9988bc86e..2670286ef 100644 --- a/frontend/packages/data-portal/app/components/Layout/AboutAndHelpDropdown.tsx +++ b/frontend/packages/data-portal/app/components/Layout/AboutAndHelpDropdown.tsx @@ -1,39 +1,30 @@ import { MenuDropdown } from 'app/components/MenuDropdown' import { MenuItemHeader } from 'app/components/MenuItemHeader' import { MenuItemLink } from 'app/components/MenuItemLink' -import { i18n } from 'app/i18n' +import { useI18n } from 'app/hooks/useI18n' -const REPO = 'https://github.com/chanzuckerberg/cryoet-data-portal' +import { ABOUT_LINKS, HELP_AND_REPORT_LINKS } from './constants' export function AboutAndHelpDropdown({ className }: { className?: string }) { - return ( - - {i18n.about} - - {i18n.faq} - {/* {i18n.license} */} - {i18n.privacyPolicy} - {/* */} - - {i18n.dataSubmissionPolicy} - - {/* - {i18n.termsOfUse} - */} + const { t } = useI18n() - {i18n.helpAndReport} + return ( + + {t('about')} - - {i18n.goToDocs} - + {ABOUT_LINKS.map(({ label, link }) => ( + + {t(label)} + + ))} - - {i18n.reportIssueOnGithub} - + {t('helpAndReport')} - {i18n.askOnGitHub} + {HELP_AND_REPORT_LINKS.map(({ label, link }) => ( + + {t(label)} + + ))} ) } diff --git a/frontend/packages/data-portal/app/components/Layout/CryoETHomeLink.tsx b/frontend/packages/data-portal/app/components/Layout/CryoETHomeLink.tsx index 84631b7a9..0203efdb3 100644 --- a/frontend/packages/data-portal/app/components/Layout/CryoETHomeLink.tsx +++ b/frontend/packages/data-portal/app/components/Layout/CryoETHomeLink.tsx @@ -1,14 +1,20 @@ import { Link } from 'app/components/Link' -import { i18n } from 'app/i18n' +import { SiteLinks } from 'app/constants/siteLinks' +import { useI18n } from 'app/hooks/useI18n' export function CryoETHomeLink() { + const { t } = useI18n() + return (
- - {i18n.title} + + {t('title')}
- {i18n.beta} + {t('beta')}
) diff --git a/frontend/packages/data-portal/app/components/Layout/Footer.tsx b/frontend/packages/data-portal/app/components/Layout/Footer.tsx index 055e422d9..57023b514 100644 --- a/frontend/packages/data-portal/app/components/Layout/Footer.tsx +++ b/frontend/packages/data-portal/app/components/Layout/Footer.tsx @@ -76,17 +76,16 @@ export function Footer() { ) return ( -