diff options
author | Quentin Gliech <quentingliech@gmail.com> | 2018-07-22 00:19:38 +0200 |
---|---|---|
committer | Quentin Gliech <quentingliech@gmail.com> | 2018-07-22 00:19:38 +0200 |
commit | 62c422fa96d9751903e8eeb8ff6bccc45eb5995a (patch) | |
tree | 18b982e0e7b143b4f65849a5f80b5f1bd0a27d88 /webui/src/index.js | |
parent | 3dd41e5da17c41d24fe295819b3717e5ae47794d (diff) | |
download | git-bug-62c422fa96d9751903e8eeb8ff6bccc45eb5995a.tar.gz |
Basic WebUI
Based on Material-UI, react-router and react-apollo
Diffstat (limited to 'webui/src/index.js')
-rw-r--r-- | webui/src/index.js | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/webui/src/index.js b/webui/src/index.js index 296b3911..8c4137fe 100644 --- a/webui/src/index.js +++ b/webui/src/index.js @@ -1,8 +1,25 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; -import './index.css'; -import App from './App'; -import registerServiceWorker from './registerServiceWorker'; +import React from "react"; +import ReactDOM from "react-dom"; +import { BrowserRouter } from "react-router-dom"; +import ApolloClient from "apollo-boost"; +import { ApolloProvider } from "react-apollo"; +import CssBaseline from "@material-ui/core/CssBaseline"; -ReactDOM.render(<App />, document.getElementById('root')); -// registerServiceWorker(); +import App from "./App"; + +const client = new ApolloClient({ + uri: "/graphql", + connectToDevTools: true +}); + +ReactDOM.render( + <ApolloProvider client={client}> + <BrowserRouter> + <React.Fragment> + <App /> + <CssBaseline /> + </React.Fragment> + </BrowserRouter> + </ApolloProvider>, + document.getElementById("root") +); |