synapsecns/sanguine

View on GitHub
packages/synapse-interface/components/ui/TranslatedText.tsx

Summary

Maintainability
A
0 mins
Test Coverage
import React from 'react'
import { useTranslations } from 'next-intl'

interface TranslatedTextProps {
  namespace: string
  id: string
}

export const TranslatedText: React.FC<TranslatedTextProps> = ({
  namespace,
  id,
}) => {
  const t = useTranslations(namespace)

  return <>{t(id)}</>
}