()
| 4 | import { useTranslation } from 'components/hooks/useTranslation' |
| 5 | |
| 6 | export const Contribution = () => { |
| 7 | const { relativePath } = useMainContext() |
| 8 | const { t } = useTranslation('contribution_cta') |
| 9 | |
| 10 | const contributionHref = relativePath |
| 11 | ? `https://github.com/github/docs/blob/main/content/${relativePath}` |
| 12 | : 'https://github.com/github/docs' |
| 13 | |
| 14 | return ( |
| 15 | <div className="f5 contribution"> |
| 16 | <h2 className="f4 mb-3">{t`title`}</h2> |
| 17 | <p className="max-w-xs color-fg-muted mb-3">{t`body`}</p> |
| 18 | <a className="btn color-border-accent-emphasis" href={contributionHref}> |
| 19 | <GitPullRequestIcon size="small" className="octicon mr-1" /> |
| 20 | {t`button`} |
| 21 | </a> |
| 22 | <p className="color-fg-muted f6 mt-2"> |
| 23 | {t`or`}{' '} |
| 24 | <a |
| 25 | href="https://github.com/github/docs/blob/main/CONTRIBUTING.md" |
| 26 | target="_blank" |
| 27 | rel="noopener" |
| 28 | > |
| 29 | {t`to_guidelines`} |
| 30 | </a> |
| 31 | </p> |
| 32 | </div> |
| 33 | ) |
| 34 | } |
nothing calls this directly
no test coverage detected