mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-01 07:38:33 -04:00

Improve linting and fix linting errors Signed-off-by: Philip Molares <philip.molares@udo.edu> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
21 lines
445 B
TypeScript
21 lines
445 B
TypeScript
import React from 'react'
|
|
import { Trans, useTranslation } from 'react-i18next'
|
|
|
|
export interface TranslatedLinkProps {
|
|
href: string;
|
|
i18nKey: string;
|
|
}
|
|
|
|
const TranslatedLink: React.FC<TranslatedLinkProps> = ({ href, i18nKey }) => {
|
|
useTranslation()
|
|
return (
|
|
<a href={href}
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
className="text-light">
|
|
<Trans i18nKey={i18nKey}/>
|
|
</a>
|
|
)
|
|
}
|
|
|
|
export { TranslatedLink }
|