2021-05-06 01:58:21 +03:00
|
|
|
import { GitPullRequestIcon } from '@primer/octicons-react'
|
|
|
|
import { useMainContext } from 'components/context/MainContext'
|
|
|
|
import { useTranslation } from 'components/hooks/useTranslation'
|
|
|
|
|
|
|
|
export const Contribution = () => {
|
|
|
|
const { relativePath } = useMainContext()
|
|
|
|
const { t } = useTranslation('contribution_cta')
|
|
|
|
|
2021-06-09 06:44:43 +03:00
|
|
|
const contributionHref = relativePath
|
2021-05-06 01:58:21 +03:00
|
|
|
? `https://github.com/github/docs/edit/main/content/${relativePath}`
|
|
|
|
: 'https://github.com/github/docs'
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="f5 contribution">
|
2021-10-06 21:09:11 +03:00
|
|
|
<h2 className="f4 mb-3">{t`title`}</h2>
|
2021-10-28 22:17:23 +03:00
|
|
|
<p className="max-w-xs color-fg-muted mb-3">{t`body`}</p>
|
2022-01-08 03:20:54 +03:00
|
|
|
<a className="btn color-border-accent-emphasis" href={contributionHref}>
|
2021-05-06 02:46:56 +03:00
|
|
|
<GitPullRequestIcon size="small" className="octicon mr-1" />
|
2021-05-06 01:58:21 +03:00
|
|
|
{t`button`}
|
|
|
|
</a>
|
2021-10-28 22:17:23 +03:00
|
|
|
<p className="color-fg-muted f6 mt-2">
|
2021-05-06 01:58:21 +03:00
|
|
|
{t`or`}{' '}
|
2021-05-25 01:40:50 +03:00
|
|
|
<a
|
|
|
|
href="https://github.com/github/docs/blob/main/CONTRIBUTING.md"
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener"
|
|
|
|
>
|
2021-05-06 01:58:21 +03:00
|
|
|
{t`to_guidelines`}
|
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|