setup i18n for the application

fixes: #23
This commit is contained in:
Erik Jan de Wit 2020-08-17 15:29:11 +02:00
parent 80e0ac0ff8
commit 45855681d5

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(
<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')
);
});