Skip to content

Commit

Permalink
feat(react-i18n): export tFunction from utils
Browse files Browse the repository at this point in the history
  • Loading branch information
flepretre committed Sep 14, 2020
1 parent 21a6baf commit 2146bc0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react-i18n/src/__tests__/index.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Trans, translate, I18nProvider, translateFunction, useTranslate } from '../';
import { Trans, translate, I18nProvider, translateFunction, useTranslate, tFunction } from '../';

describe('index', () => {
it('should export translate function', () => {
Expand All @@ -7,5 +7,6 @@ describe('index', () => {
expect(typeof I18nProvider).toBe('function');
expect(typeof translateFunction).toBe('function');
expect(typeof useTranslate).toBe('function');
expect(typeof tFunction).toBe('function');
});
});
1 change: 1 addition & 0 deletions packages/react-i18n/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ export { Trans } from './components/i18nString.component';
export { HtmlTrans } from './components/i18nElement.component';
export { I18nProvider } from './components/i18n.provider';
export { useTranslate } from './hooks/useTranslate';
export { translate as tFunction } from './utils/i18n.utils';

0 comments on commit 2146bc0

Please sign in to comment.