mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-04 16:54:11 -04:00
Restructure Link Components and fix internal link children error (#106)
* Restructure Link Components and fix internal link children error
This commit is contained in:
parent
177f639492
commit
5c716bd314
7 changed files with 42 additions and 50 deletions
|
@ -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}/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue