<commit_before>import React, { PropTypes } from 'react';
import { createModule } from 'redux-modules';
import localModule from '../utils/localModule';
import { ButtonCircle, Panel, PanelHeader, Overlay } from 'rebass';
import { compose, setPropTypes } from 'recompose';

const NewContentModal = ({ actions, modal = {} }) => (
  <div>
    <ButtonCircle onClick={actions.open}>
      Add
    </ButtonCircle>
    <Overlay
      open={modal.open}
      onDismiss={actions.close}
    >
      <Panel>
        <PanelHeader>
          Add Content
        </PanelHeader>
      </Panel>
    </Overlay>
  </div>
);

const module = createModule({
  name: 'modal',
  transformations: {
    open: state => ({ ... state, open: true }),
    close: state => ({ ... state, open: false }),
  },
});

export default compose(
  localModule(module),
  setPropTypes({
    actions: PropTypes.shape({
      open: PropTypes.func.isRequired,
      close: PropTypes.func.isRequired,
    }),
    modal: PropTypes.shape({
      open: PropTypes.bool,
    }),
  })
)(NewContentModal);<commit_msg>Added initial state to modal module<commit_after>import React, { PropTypes } from 'react';
import { createModule } from 'redux-modules';
import localModule from '../utils/localModule';
import { ButtonCircle, Panel, PanelHeader, Overlay } from 'rebass';
import { compose, setPropTypes } from 'recompose';

const NewContentModal = ({ actions, modal = {} }) => (
  <div>
    <ButtonCircle onClick={actions.open}>
      Add
    </ButtonCircle>
    <Overlay
      open={modal.open}
      onDismiss={actions.close}
    >
      <Panel>
        <PanelHeader>
          Add Content
        </PanelHeader>
      </Panel>
    </Overlay>
  </div>
);

const module = createModule({
  name: 'modal',
  initialState: { open: false },
  transformations: {
    open: state => ({ ... state, open: true }),
    close: state => ({ ... state, open: false }),
  },
});

export default compose(
  localModule(module),
  setPropTypes({
    actions: PropTypes.shape({
      open: PropTypes.func.isRequired,
      close: PropTypes.func.isRequired,
    }),
    modal: PropTypes.shape({
      open: PropTypes.bool,
    }),
  })
)(NewContentModal);
{'fraction_non_alphanumeric': 0.15254237288135594, 'fraction_numerical': 0.0, 'mean_word_length': 2.9351351351351354, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7477658', 'n_tokens_mistral': 654, 'n_tokens_neox': 669, 'n_words': 161}