Skip to content

Commit

Permalink
Updated react-i18next to remove create-react-context (#310)
Browse files Browse the repository at this point in the history
* Updated react-i18next to remove create-react-context

* Changed react-i18next to exact version 11.5
  • Loading branch information
c-ryan-k committed Jun 12, 2020
1 parent 0ec401a commit 3ce8e4c
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 127 deletions.
158 changes: 37 additions & 121 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -90,7 +90,7 @@
"react": "16.8.6",
"react-collapsible": "2.3.2",
"react-dom": "16.8.6",
"react-i18next": "8.1.0",
"react-i18next": "11.5.0",
"react-infinite-scroller": "1.2.2",
"react-jsonschema-form": "1.7.0",
"react-monaco-editor": "0.30.1",
Expand Down
@@ -1,7 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`localizer matches snapshot 1`] = `
<ContextConsumer>
<Component />
</ContextConsumer>
<Component
i18n={Object {}}
t={[Function]}
tReady={false}
/>
`;
4 changes: 2 additions & 2 deletions src/app/shared/components/localizer.tsx
Expand Up @@ -4,7 +4,7 @@
**********************************************************/
import * as React from 'react';
import { TranslationFunction } from 'i18next';
import { withNamespaces } from 'react-i18next';
import { withTranslation } from 'react-i18next';
import { LocalizationContextProvider } from '../contexts/localizationContext';

const TRANSLATION_NAMESPACE = 'translation';
Expand All @@ -16,4 +16,4 @@ export const Localizer: React.FC<{ t: TranslationFunction}> = props => {
);
};

export default withNamespaces(TRANSLATION_NAMESPACE)(Localizer as any); // tslint:disable-line: no-any
export default withTranslation(TRANSLATION_NAMESPACE)(Localizer as any); // tslint:disable-line: no-any

0 comments on commit 3ce8e4c

Please sign in to comment.