use-phrases.ts 508 B

1234567891011121314151617
  1. import { useTranslation } from 'react-i18next'
  2. import { useMemo } from 'react'
  3. export const usePhrases = (): Record<string, string> => {
  4. const { t } = useTranslation()
  5. return useMemo(() => {
  6. return {
  7. 'Fold line': t('fold_line'),
  8. 'Unfold line': t('unfold_line'),
  9. 'Learn more': t('learn_more'),
  10. 'Hide document preamble': t('hide_document_preamble'),
  11. 'Show document preamble': t('show_document_preamble'),
  12. 'End of document': t('end_of_document'),
  13. }
  14. }, [t])
  15. }