aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'webui/src/index.js')
-rw-r--r--webui/src/index.js31
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")
+);