aboutsummaryrefslogblamecommitdiffstats
path: root/webui/src/index.js
blob: f71e82f36ebbc683dc9503f8ecfab36b23fff75c (plain) (tree)
1
2
3
4
5
6
7
8
9

                                                              




                                                 
 
                        

                               

                                 
                  
   



                                  




                                                

                    
                                 
  
import ThemeProvider from '@material-ui/styles/ThemeProvider';
import { createMuiTheme } from '@material-ui/core/styles';
import ApolloClient from 'apollo-boost';
import React from 'react';
import { ApolloProvider } from 'react-apollo';
import ReactDOM from 'react-dom';
import { BrowserRouter } from 'react-router-dom';

import App from './App';

const theme = createMuiTheme();

const client = new ApolloClient({
  uri: '/graphql',
});

ReactDOM.render(
  <ApolloProvider client={client}>
    <BrowserRouter>
      <ThemeProvider theme={theme}>
        <React.Suspense fallback={'Loading…'}>
          <App />
        </React.Suspense>
      </ThemeProvider>
    </BrowserRouter>
  </ApolloProvider>,
  document.getElementById('root')
);