Merge pull request #24 from edewit/i18n-setup
setup i18n for the application
This commit is contained in:
commit
b7d08a4d1f
1 changed files with 9 additions and 5 deletions
|
@ -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(
|
||||
<KeycloakContext.Provider value={keycloakService}>
|
||||
<HttpClientContext.Provider value={new HttpClient(keycloakService)}>
|
||||
<App />
|
||||
</HttpClientContext.Provider>
|
||||
</KeycloakContext.Provider>,
|
||||
<I18nextProvider i18n={i18n}>
|
||||
<KeycloakContext.Provider value={keycloakService}>
|
||||
<HttpClientContext.Provider value={new HttpClient(keycloakService)}>
|
||||
<App />
|
||||
</HttpClientContext.Provider>
|
||||
</KeycloakContext.Provider>
|
||||
</I18nextProvider>,
|
||||
document.getElementById('app')
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue