Merge pull request #24 from edewit/i18n-setup

setup i18n for the application
This commit is contained in:
Stan Silvert 2020-08-17 14:57:25 -04:00 committed by GitHub
commit b7d08a4d1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,7 @@
import React from 'react';
import ReactDom from 'react-dom';
import { I18nextProvider } from 'react-i18next';
import { i18n } from './i18n';
import { App } from './App';
import init from './auth/keycloak';
@ -11,11 +13,13 @@ import { HttpClient } from './http-service/http-client';
init().then((keycloak) => {
const keycloakService = new KeycloakService(keycloak);
ReactDom.render(
<I18nextProvider i18n={i18n}>
<KeycloakContext.Provider value={keycloakService}>
<HttpClientContext.Provider value={new HttpClient(keycloakService)}>
<App />
</HttpClientContext.Provider>
</KeycloakContext.Provider>,
</KeycloakContext.Provider>
</I18nextProvider>,
document.getElementById('app')
);
});