2017-05-18 21:21:33 +03:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
import { ThemeProvider, injectGlobal } from 'styled-components';
|
|
|
|
import { theme, global } from 'joyent-ui-toolkit';
|
|
|
|
import { ApolloProvider } from 'react-apollo';
|
|
|
|
|
|
|
|
import { client, store } from '@state/store';
|
|
|
|
import Router from '@root/router';
|
|
|
|
|
|
|
|
class App extends Component {
|
|
|
|
componentWillMount() {
|
|
|
|
// eslint-disable-next-line no-unused-expressions
|
|
|
|
injectGlobal`
|
|
|
|
${global}
|
|
|
|
`;
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<ApolloProvider client={client} store={store}>
|
|
|
|
<ThemeProvider theme={theme}>
|
2017-06-26 17:29:12 +03:00
|
|
|
{Router}
|
2017-05-18 21:21:33 +03:00
|
|
|
</ThemeProvider>
|
|
|
|
</ApolloProvider>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default App;
|