<commit_before>import React from 'react';
import { connect } from 'react-redux';
import { translate } from 'react-i18next';
import Site from './Site';
import * as deps from '../../dependencies';

const SitesList = ({ sites }) => (
  <div className="columns is-multiline">
    {sites.map(site => (
      <Site {...site} date={site.modifiedAt.$date} key={site.id} />
    ))}
  </div>
);
SitesList.propTypes = {
  sites: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
  t: React.PropTypes.func.isRequired,
};

const mapStateToProps = state => ({
  sites: deps.selectors.getAllSites(state),
});

export default connect(mapStateToProps)(translate('bulma', { wait: true })(SitesList));<commit_msg>Added SiteList content when there's no any site. Fixes #34<commit_after>import React from 'react';
import { connect } from 'react-redux';
import { translate } from 'react-i18next';
import { Link } from 'react-router';

import Site from './Site';
import * as deps from '../../dependencies';

const SitesList = ({ sites }) => {
  if (sites.length === 0) {
    return (
      <section className="hero is-medium">
        <div className="hero-body">
          <div className="container has-text-centered">
            <h1 className="title">
              No sites found
            </h1>
            <h2 className="subtitle">
              <Link to="/add-site">Add a WordPress site</Link> to start using Worona
            </h2>
          </div>
        </div>
      </section>
    );
  }
  return (
    <div className="columns is-multiline">
      {sites.map(site => (
        <Site {...site} date={site.modifiedAt.$date} key={site.id} />
      ))}
    </div>
  );
};

SitesList.propTypes = {
  sites: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
};

const mapStateToProps = state => ({
  sites: deps.selectors.getAllSites(state),
});

export default connect(mapStateToProps)(translate('bulma', { wait: true })(SitesList));
{'fraction_non_alphanumeric': 0.16812790097988653, 'fraction_numerical': 0.005673027333677153, 'mean_word_length': 3.0842105263157893, 'pattern_counts': {'":': 0, '<': 21, '<?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': '538396', 'n_tokens_mistral': 618, 'n_tokens_neox': 606, 'n_words': 142}