text: // @flow
  import React, { Component } from 'react';
  import { Provider } from 'react-redux';
  import { ConnectedRouter } from 'connected-react-router';
  import { createMuiTheme, MuiThemeProvider } from '@material-ui/core/styles';
  import type { Store } from '../reducers/types';
  import Routes from '../Routes';
  import indigo from '@material-ui/core/colors/indigo';
  import pink from '@material-ui/core/colors/pink';
  import red from '@material-ui/core/colors/red';
  
  type Props = {
      store: Store,
      history: {}
  };
  
  const theme = createMuiTheme({
      palette: {
          // type: 'dark',
          primary: indigo,
          secondary: pink,
          error: red,
          // Used by `getContrastText()` to maximize the contrast between the background and
          // the text.
          contrastThreshold: 3,
          // Used to shift a color's luminance by approximately
          // two indexes within its tonal palette.
          // E.g., shift from Red 500 to Red 300 or Red 700.
          tonalOffset: 0.2
      }
  });
  
  export default class Root extends Component<Props> {
      render() {
          const { store, history } = this.props;
          return (
              <Provider store={store}>
                  <MuiThemeProvider theme={theme}>
                      <ConnectedRouter history={history}>
                          <Routes />
                      </ConnectedRouter>
                  </MuiThemeProvider>
              </Provider>
          );
      }
  }
  