<commit_before>import React, { PureComponent, PropTypes } from 'react';
import { connect } from 'react-redux';
import { Redirect } from 'react-router-dom';
import DraggableList from 'react-draggable-list';
import classNames from 'classnames/bind';



import styles from './StoriesList.scss';
const cx = classNames.bind(styles);


import StoryCard from './components/Story-Card/StoryCard.jsx';
import NewStroyForm from './components/New-Story-Form/NewStroyForm.jsx';
import DeleteModal from '../../components/Delete-Modal/DeleteModal.jsx';

const draggableListContainer = () => document.body;

class StoriesList extends PureComponent {
  displayName = 'StoriesList';

  state = {
    useContainer: false,
    deleteModalOpen: false,
    deleteTarget: false
  };


  componentWillMount() {
    this.props.actions.getStories();
  }


  _onMoveEnd = (newList) => {
    this.props.actions.changeStoriesOrder(newList);
  }

  _createKeyForStoryCard = story => `story_${story.id}`;

  _openDeleteModal = (deleteTargetId, name) => {
    this.setState({
      deleteModalOpen: true,
      deleteTarget: {
        id: deleteTargetId,
        name
      }
    })
  }

  _closeDeleteModal = () => {
    this.setState({
      deleteModalOpen: false,
      deleteTarget: false
    })
  }

  _deleteStory = () => {
    const {actions} = this.props;
    const {deleteTarget} = this.state;<commit_msg>move StoriesList getStories action from cwm to cdm<commit_after>import React, { PureComponent, PropTypes } from 'react';
import { connect } from 'react-redux';
import { Redirect } from 'react-router-dom';
import DraggableList from 'react-draggable-list';
import classNames from 'classnames/bind';



import styles from './StoriesList.scss';
const cx = classNames.bind(styles);


import StoryCard from './components/Story-Card/StoryCard.jsx';
import NewStroyForm from './components/New-Story-Form/NewStroyForm.jsx';
import DeleteModal from '../../components/Delete-Modal/DeleteModal.jsx';

const draggableListContainer = () => document.body;

class StoriesList extends PureComponent {
  displayName = 'StoriesList';

  state = {
    useContainer: false,
    deleteModalOpen: false,
    deleteTarget: false
  };

  componentDidMount() {
    this.props.actions.getStories();
  }

  _onMoveEnd = (newList) => {
    this.props.actions.changeStoriesOrder(newList);
  }

  _createKeyForStoryCard = story => `story_${story.id}`;

  _openDeleteModal = (deleteTargetId, name) => {
    this.setState({
      deleteModalOpen: true,
      deleteTarget: {
        id: deleteTargetId,
        name
      }
    })
  }

  _closeDeleteModal = () => {
    this.setState({
      deleteModalOpen: false,
      deleteTarget: false
    })
  }

  _deleteStory = () => {
    const {actions} = this.props;
    const {deleteTarget} = this.state;
{'fraction_non_alphanumeric': 0.1284796573875803, 'fraction_numerical': 0.0, 'mean_word_length': 3.5355987055016183, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '1204725', 'n_tokens_mistral': 889, 'n_tokens_neox': 861, 'n_words': 182}