зеркало из https://github.com/github/docs.git
fix: linting
This commit is contained in:
Родитель
7620a8edfa
Коммит
0ce7b00471
|
@ -1,5 +1,5 @@
|
|||
import { MarkGithubIcon } from "@primer/octicons-react";
|
||||
import { useTranslation } from "components/hooks/useTranslation";
|
||||
import { MarkGithubIcon } from '@primer/octicons-react'
|
||||
import { useTranslation } from 'components/hooks/useTranslation'
|
||||
|
||||
export const SmallFooter = () => {
|
||||
const { t } = useTranslation('footer')
|
||||
|
@ -12,45 +12,31 @@ export const SmallFooter = () => {
|
|||
<span>© {new Date().getFullYear()} GitHub, Inc.</span>
|
||||
</li>
|
||||
<li className="ml-3">
|
||||
<a href="/github/site-policy/github-terms-of-service">
|
||||
{t`terms`}
|
||||
</a>
|
||||
<a href="/github/site-policy/github-terms-of-service">{t`terms`}</a>
|
||||
</li>
|
||||
<li className="ml-3">
|
||||
<a href="/github/site-policy/github-privacy-statement">
|
||||
{t`privacy`}{" "}
|
||||
</a>
|
||||
<a href="/github/site-policy/github-privacy-statement">{t`privacy`} </a>
|
||||
</li>
|
||||
<li className="ml-3">
|
||||
<a href="https://github.com/security">
|
||||
{t`product.links.security`}
|
||||
</a>
|
||||
<a href="https://github.com/security">{t`product.links.security`}</a>
|
||||
</li>
|
||||
<li className="ml-3">
|
||||
<a href="https://www.githubstatus.com/">
|
||||
{t`support.links.status`}
|
||||
</a>
|
||||
<a href="https://www.githubstatus.com/">{t`support.links.status`}</a>
|
||||
</li>
|
||||
<li className="ml-3">
|
||||
<a href="/">{t`support.links.help`}</a>
|
||||
</li>
|
||||
<li className="ml-3">
|
||||
<a href="https://support.github.com">
|
||||
{t`support.links.contact_github`}
|
||||
</a>
|
||||
<a href="https://support.github.com">{t`support.links.contact_github`}</a>
|
||||
</li>
|
||||
<li className="ml-3">
|
||||
<a href="https://github.com/pricing">
|
||||
{t`product.links.pricing`}
|
||||
</a>
|
||||
<a href="https://github.com/pricing">{t`product.links.pricing`}</a>
|
||||
</li>
|
||||
<li className="ml-3">
|
||||
<a href="/developers">{t`platform.links.developer_api`}</a>
|
||||
</li>
|
||||
<li className="ml-3">
|
||||
<a href="https://services.github.com/">
|
||||
{t`support.links.training`}
|
||||
</a>
|
||||
<a href="https://services.github.com/">{t`support.links.training`}</a>
|
||||
</li>
|
||||
<li className="ml-3">
|
||||
<a href="https://github.com/about">{t`company.links.about`}</a>
|
||||
|
@ -58,5 +44,5 @@ export const SmallFooter = () => {
|
|||
</ul>
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { useRouter } from 'next/router'
|
||||
|
||||
type VersionInfo = {
|
||||
currentVersion: string;
|
||||
isEnterprise: boolean;
|
||||
};
|
||||
currentVersion: string
|
||||
isEnterprise: boolean
|
||||
}
|
||||
const DEFAULT_VERSION = 'free-pro-team@latest'
|
||||
export const useVersion = (): VersionInfo => {
|
||||
const router = useRouter()
|
||||
const currentVersion = (router.query.versionId as string) || DEFAULT_VERSION
|
||||
return { currentVersion, isEnterprise: currentVersion.includes('enterprise') };
|
||||
};
|
||||
return { currentVersion, isEnterprise: currentVersion.includes('enterprise') }
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче