Make internal footer links dynamic to language picker : Fixes #11274

This commit is contained in:
Anil Seervi 2021-10-18 15:13:47 +00:00 коммит произвёл GitHub
Родитель 06a3a7b91c
Коммит 8189f38035
1 изменённых файлов: 11 добавлений и 3 удалений

Просмотреть файл

@ -1,19 +1,25 @@
import { useRouter } from 'next/router'
import { MarkGithubIcon } from '@primer/octicons-react'
import { useTranslation } from 'components/hooks/useTranslation'
export const SmallFooter = () => {
const router = useRouter()
const { t } = useTranslation('footer')
return (
<footer className="container-xl px-3 mt-6 mb-8 px-md-6 position-relative d-flex flex-row-reverse flex-xl-row flex-wrap flex-xl-nowrap flex-justify-center flex-xl-justify-between f6 color-text-secondary">
<ul className="list-style-none d-flex flex-wrap col-12 col-xl-5 flex-justify-center flex-xl-justify-between mb-2 mb-xl-0">
<li className="mr-3 mr-xl-0">&copy; {new Date().getFullYear()} GitHub, Inc.</li>
<li className="mr-3 mr-xl-0">
<a href="https://docs.github.com/en/github/site-policy/github-terms-of-service">
<a
href={`https://docs.github.com/${router.locale}/github/site-policy/github-terms-of-service`}
>
{t('terms')}
</a>
</li>
<li className="mr-3 mr-xl-0">
<a href="https://docs.github.com/en/github/site-policy/github-privacy-statement">
<a
href={`https://docs.github.com/${router.locale}/github/site-policy/github-privacy-statement`}
>
{t('privacy')}
</a>
</li>
@ -45,7 +51,9 @@ export const SmallFooter = () => {
<a href="https://github.com/pricing">{t('product.links.pricing')}</a>
</li>
<li className="mr-3 mr-xl-0">
<a href="https://docs.github.com/en/developers">{t('platform.links.developer_api')}</a>
<a href={`https://docs.github.com/${router.locale}/developers`}>
{t('platform.links.developer_api')}
</a>
</li>
<li className="mr-3 mr-xl-0">
<a href="https://services.github.com">{t('support.links.training')}</a>