content: import React from 'react';
  import { connect } from 'react-redux';
  
  import CRUD from '../libs/CRUD';
  import Layout from './Layout';
  
  const Container = props => <Layout {...props} />;
  
  const mapStateToProps = state => ({ state });
  
  const mapDispatchToProps = dispatch => ({
    dispatch,
  });
  
  const mergeProps = (stateProps, dispatchProps, ownProps) => {
    const { dispatch } = dispatchProps;
    const { state } = stateProps;
    const {
      children,
      location,
      params,
      router,
    } = ownProps;
    const {
      goBack,
      goForward,
      push,
      replace,
    } = router;
    const { pathname } = location;
    return {
      ...{
        CRUD: CRUD({ dispatch, state }),
        children,
        dispatch,
        history: {
          goBack,
          goForward,
          push,
          replace,
        },
        location: {
          pathname,
        },
        params,
        state,
      },
    };
  };
  
  const Root = connect(mapStateToProps, mapDispatchToProps, mergeProps)(Container);
  
  export default Root;
  