Restructure Link Components and fix internal link children error (#106)

* Restructure Link Components and fix internal link children error
This commit is contained in:
mrdrogdrog 2020-05-31 13:25:41 +02:00 committed by GitHub
parent 177f639492
commit 5c716bd314
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 42 additions and 50 deletions

View file

@ -1,9 +1,9 @@
import React from 'react'
import { useTranslation } from 'react-i18next'
import { InternalLink, InternalLinkProp } from './internal-link'
import { TranslatedLinkProps } from './translated-external-link'
import { InternalLink } from './internal-link'
import { TranslatedLinkProps } from './types'
export const TranslatedInternalLink: React.FC<TranslatedLinkProps & InternalLinkProp> = ({ i18nKey, i18nOption, ...props }) => {
export const TranslatedInternalLink: React.FC<TranslatedLinkProps> = ({ i18nKey, i18nOption, ...props }) => {
const { t } = useTranslation()
return (
<InternalLink text={t(i18nKey, i18nOption)} {...props}/>