hedgedoc/src/components/landing/layout/footer/translated-link.tsx
Philip Molares eba59ae622
better linting (#72)
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>
2020-05-27 15:43:28 +02:00

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 }