<commit_before>import { provideHooks } from 'redial';
import React, { PropTypes } from 'react';
import { StyleSheet, css } from 'aphrodite';
import Helmet from 'react-helmet';
import { connect } from 'react-redux';
import { loadPosts } from '../actions';
import PostListItem from '../components/PostListItem';
import { selectPosts } from '../reducer';

const redial = {
  fetch: ({ dispatch }) => dispatch(loadPosts()),
};

const mapStateToProps = state => ({
  posts: selectPosts(state),
});

/* I added padding so it doesn't go underneath nav */
const styles = StyleSheet.create({
  title: {
    fontSize: 28,
    margin: '0 auto 1.5rem',
    color: '#b7b7b7',
  },
});

const PostListPage = ({ posts }) => (
  <div className={css(styles.root)}>
    <Helmet title="Posts" />
    {posts.isLoading &&
      <div>
        <h2>Loading....</h2>
      </div>}
    {!posts.isLoading &&
      posts.data.map((post, i) => <PostListItem key={post.id} post={post} />)}
  </div>
);

PostListPage.PropTypes = {
  posts: PropTypes.array.isRequired,
};

export default provideHooks(redial)(connect(mapStateToProps)(PostListPage));
<commit_msg>change to props of PostListPage<commit_after>import { provideHooks } from 'redial';
import React, { PropTypes } from 'react';
import { StyleSheet, css } from 'aphrodite';
import Helmet from 'react-helmet';
import { connect } from 'react-redux';
import { loadPosts } from '../actions';
import PostListItem from '../components/PostListItem';
import { selectPosts } from '../reducer';

const redial = {
  fetch: ({ dispatch }) => dispatch(loadPosts()),
};

const mapStateToProps = state => ({
  posts: selectPosts(state),
});

/* I added padding so it doesn't go underneath nav */
const styles = StyleSheet.create({
  title: {
    fontSize: 28,
    margin: '0 auto 1.5rem',
    color: '#b7b7b7',
  },
});

const PostListPage = props => (
  <div className={css(styles.root)}>
    <Helmet title="Posts" />
    {props.posts.isLoading &&
      <div>
        <h2>Loading....</h2>
      </div>}
    {!props.posts.isLoading &&
      props.posts.data.map((post, i) => <PostListItem key={post.id} post={post} />)}
  </div>
);

PostListPage.PropTypes = {
  posts: PropTypes.array.isRequired,
};

export default provideHooks(redial)(connect(mapStateToProps)(PostListPage));

{'fraction_non_alphanumeric': 0.17248908296943233, 'fraction_numerical': 0.008733624454148471, 'mean_word_length': 3.813025210084034, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 27, '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': '1878209', 'n_tokens_mistral': 761, 'n_tokens_neox': 746, 'n_words': 182}