import React from 'react';
import {Provider} from 'react-redux';
import {Router, Route, IndexRoute} from 'react-router';
import HomeContainer from '../../home/components/HomeContainer';
import TranslationProvider from './translation/TranslationProvider';
import {routerPaths} from '../constants';

const routes = (
    <Route path="/">
      <IndexRoute component={HomeContainer}/>
      <Route path={routerPaths.singleUnit} component={HomeContainer}/>
    </Route>
);

const App = ({store, history}) => (
  <TranslationProvider>
    <Provider store={store}>
        <Router history={history} routes={routes} key={Math.random()}/>
      </Provider>
  </TranslationProvider>
);

export default App;
import React from 'react';
import {Provider} from 'react-redux';
import {Router, Route, IndexRoute} from 'react-router';
import HomeContainer from '../../home/components/HomeContainer';
import TranslationProvider from './translation/TranslationProvider';
import {routerPaths} from '../constants';

const routes = (
    <Route path="/">
      <IndexRoute component={HomeContainer}/>
      <Route path={routerPaths.singleUnit} component={HomeContainer}/>
    </Route>
);

const App = ({store, history}) => (
    <Provider store={store}>
      <TranslationProvider>
        <Router history={history} routes={routes} key={Math.random()}/>
      </TranslationProvider>
    </Provider>
);

export default App;
Change order of translation provider and store provider to allow translation provider access the storage
Change order of translation provider and store provider to allow translation provider access the storage
