aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/index.js
diff options
context:
space:
mode:
authorQuentin Gliech <quentingliech@gmail.com>2018-07-22 00:19:38 +0200
committerQuentin Gliech <quentingliech@gmail.com>2018-07-22 00:19:38 +0200
commit62c422fa96d9751903e8eeb8ff6bccc45eb5995a (patch)
tree18b982e0e7b143b4f65849a5f80b5f1bd0a27d88 /webui/src/index.js
parent3dd41e5da17c41d24fe295819b3717e5ae47794d (diff)
downloadgit-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.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")
+);