import { ReactElement } from 'react' ; import TranslateMarkdown from '@components/TranslateMarkdown' ; import { translateRaw } from './translateRaw' ; export type TranslatedText = ReactElement < any > | string ; export function translate ( key , variables ? ) { return < TranslateMarkdown source = { translateRaw ( key , variables ) } />; } export default translate ;