<commit_before>import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import { Map } from 'immutable'
import withWidth, { SMALL, LARGE } from 'material-ui/utils/withWidth'
import { DEFAULT_LIST } from 'utils'
import ListSnippet from './ListSnippet'
import PictogramSnippet from 'components/PictogramSnippet'

const Masonry = require('react-masonry-component')
const masonryOptions = {
  transitionDuration: '1s'
}

const styles = {
  masonry: {
    listStyleType: 'none',
    display: 'flex',
    flexWrap: 'wrap',
    flexGrow: 2,
    justifyContent: 'space-around'
  }
}

export class FavoriteList extends PureComponent {
  render() {
    const {
      items,
      width,
      selectedList,
      onDownloadList,
      onDeleteList,
      onSelectList,
      listPictograms
    } = this.props
    const [...lists] = items.keys()
    let renderLists
    if (selectedList === DEFAULT_LIST) {
      renderLists = lists
        .filter((listItem) => listItem !== DEFAULT_LIST)
        .map((listItem) => {
          const totalItems = items.get(selectedList).size
          return (
            <ListSnippet
              key={listItem}
              listName={listItem}
              totalItems={totalItems}
              onDelete={onDeleteList}
              onDownload={onDownloadList}
              onSelect={onSelectList}
            />
          )
        })
    } else {
      /* in these case we just render back button */<commit_msg>fix numer items favorite lists<commit_after>import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import { Map } from 'immutable'
import withWidth, { SMALL, LARGE } from 'material-ui/utils/withWidth'
import { DEFAULT_LIST } from 'utils'
import ListSnippet from './ListSnippet'
import PictogramSnippet from 'components/PictogramSnippet'

const Masonry = require('react-masonry-component')
const masonryOptions = {
  transitionDuration: '1s'
}

const styles = {
  masonry: {
    listStyleType: 'none',
    display: 'flex',
    flexWrap: 'wrap',
    flexGrow: 2,
    justifyContent: 'space-around'
  }
}

export class FavoriteList extends PureComponent {
  render() {
    const {
      items,
      width,
      selectedList,
      onDownloadList,
      onDeleteList,
      onSelectList,
      listPictograms
    } = this.props
    const [...lists] = items.keys()
    let renderLists
    if (selectedList === DEFAULT_LIST) {
      renderLists = lists
        .filter((listItem) => listItem !== DEFAULT_LIST)
        .map((listItem) => {
          const totalItems = items.get(listItem).size
          return (
            <ListSnippet
              key={listItem}
              listName={listItem}
              totalItems={totalItems}
              onDelete={onDeleteList}
              onDownload={onDownloadList}
              onSelect={onSelectList}
            />
          )
        })
    } else {
      /* in these case we just render back button */
{'fraction_non_alphanumeric': 0.10519172039362062, 'fraction_numerical': 0.0013573125212080082, 'mean_word_length': 2.400230680507497, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5508283', 'n_tokens_mistral': 855, 'n_tokens_neox': 850, 'n_words': 204}