diff options
author | Michael Muré <batolettre@gmail.com> | 2019-05-22 20:09:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-22 20:09:29 +0200 |
commit | e781d6c7fe7dba2fc526c2049aa188c9988e1cf4 (patch) | |
tree | 5d51b4fbf5c6dfd8439d01e4a900f074bf8d9ac1 /webui/src/index.js | |
parent | 1a7ccd594adc6f185115ce12a4368c55ff418678 (diff) | |
parent | a43c7ea1c8caa61fa92bf384cd7436476fcb2b0b (diff) | |
download | git-bug-e781d6c7fe7dba2fc526c2049aa188c9988e1cf4.tar.gz |
Merge pull request #148 from MichaelMure/sandhose/webui-update-deps
Updates WebUI dependencies & rework the bug list pagination
Diffstat (limited to 'webui/src/index.js')
-rw-r--r-- | webui/src/index.js | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/webui/src/index.js b/webui/src/index.js index f5d95ccc..885911f5 100644 --- a/webui/src/index.js +++ b/webui/src/index.js @@ -1,22 +1,31 @@ +import { install } from '@material-ui/styles'; +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'; +install(); + +// TODO(sandhose): this is temporary until Material-UI v4 goes out +const App = React.lazy(() => import('./App')); + +const theme = createMuiTheme(); const client = new ApolloClient({ uri: '/graphql', - connectToDevTools: true, }); ReactDOM.render( <ApolloProvider client={client}> <BrowserRouter> - <React.Fragment> - <App /> - </React.Fragment> + <ThemeProvider theme={theme}> + <React.Suspense fallback={'Loading…'}> + <App /> + </React.Suspense> + </ThemeProvider> </BrowserRouter> </ApolloProvider>, document.getElementById('root') |