joyent-portal/packages/cp-frontend/src/app.js
2017-08-28 20:24:36 +01:00

27 lines
642 B
JavaScript

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}>{Router}</ThemeProvider>
</ApolloProvider>
);
}
}
export default App;