-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroot-wrapper.js
More file actions
33 lines (27 loc) · 808 Bytes
/
Copy pathroot-wrapper.js
File metadata and controls
33 lines (27 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import {Provider} from './src/utils/github-client'
import { MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles';
import CssBaseline from '@material-ui/core/CssBaseline';
import "./src/styles/global.css"
import React from 'react';
import ApolloClient from 'apollo-boost';
import { ApolloProvider } from '@apollo/react-hooks';
const theme = createMuiTheme();
const client = new ApolloClient({
fetch,
uri: `https://api.github.com/graphql`
})
const wrapRoot = ({ element }) => {
return (
<>
<MuiThemeProvider theme={theme}>
<Provider>
<CssBaseline/>
<ApolloProvider client={client}>
{element}
</ApolloProvider>
</Provider>
</MuiThemeProvider>
</>
)
}
export default wrapRoot;