<commit_before>import React, { PropTypes } from 'react'
import { Link as LinkRouter } from 'react-router'
import { connect } from 'react-redux'
import recompact from 'modules/recompact'
import Text from 'material-ui/Text'
import WatchTask from 'modules/components/WatchTask'
import WatchTaskContainer from 'modules/components/WatchTaskContainer'
import Avatar from 'material-ui/Avatar'
import Paper from 'material-ui/Paper'
import Layout from 'material-ui/Layout'
import {
  List,
  ListItem,
  ListItemText,
} from 'material-ui/List'
import ViewContainer from 'modules/components/ViewContainer'
import ScrollView from 'modules/components/ScrollView'
import LayoutBody from 'modules/components/LayoutBody'
import ReviewAppBar from 'review/modules/AppBar/AppBar'
import actionTypes from 'review/modules/redux/actionTypes'

function Dashboard(props) {
  const {
    fetch,
  } = props

  return (
    <ViewContainer>
      <ReviewAppBar />
      <ScrollView>
        <LayoutBody margin>
          <Text type="display1" component="h2" gutterBottom>
            {'Dashboard'}
          </Text>
          <Paper>
            <WatchTask task={fetch}>
              {() => {
                const { owners } = fetch.output.data

                if (owners.length === 0) {
                  return (
                    <WatchTaskContainer>
                      <Text>
                        {'No organization'}
                      </Text>
                    </WatchTaskContainer>
                  )
                }

                return (
                  <List>
                    {owners.map(({ name }) => (
                      <ListItem
                        key={name}
                        button
                        component={LinkRouter}
                        to={`/${name}`}
                      >
                        <Layout container align="center">
                          <Layout item>
                            <Avatar src={`https://github.com/${name}.png?size=200`} />
                          </Layout>
                          <Layout item>
                            <ListItemText primary={name} />
                          </Layout>
                        </Layout>
                      </ListItem>
                    ))}
                  </List><commit_msg>refactor: simplify avatar usage<commit_after>import React, { PropTypes } from 'react'
import { Link as LinkRouter } from 'react-router'
import { connect } from 'react-redux'
import recompact from 'modules/recompact'
import Text from 'material-ui/Text'
import WatchTask from 'modules/components/WatchTask'
import WatchTaskContainer from 'modules/components/WatchTaskContainer'
import Avatar from 'material-ui/Avatar'
import Paper from 'material-ui/Paper'
import {
  List,
  ListItem,
  ListItemText,
} from 'material-ui/List'
import ViewContainer from 'modules/components/ViewContainer'
import ScrollView from 'modules/components/ScrollView'
import LayoutBody from 'modules/components/LayoutBody'
import ReviewAppBar from 'review/modules/AppBar/AppBar'
import actionTypes from 'review/modules/redux/actionTypes'

function Dashboard(props) {
  const {
    fetch,
  } = props

  return (
    <ViewContainer>
      <ReviewAppBar />
      <ScrollView>
        <LayoutBody margin>
          <Text type="display1" component="h2" gutterBottom>
            {'Dashboard'}
          </Text>
          <Paper>
            <WatchTask task={fetch}>
              {() => {
                const { owners } = fetch.output.data

                if (owners.length === 0) {
                  return (
                    <WatchTaskContainer>
                      <Text>
                        {'No organization'}
                      </Text>
                    </WatchTaskContainer>
                  )
                }

                return (
                  <List>
                    {owners.map(({ name }) => (
                      <ListItem
                        key={name}
                        button
                        component={LinkRouter}
                        to={`/${name}`}
                      >
                        <Avatar src={`https://github.com/${name}.png?size=200`} />
                        <ListItemText primary={name} />
                      </ListItem>
                    ))}
                  </List>
{'fraction_non_alphanumeric': 0.101932811780948, 'fraction_numerical': 0.0027611596870685687, 'mean_word_length': 1.4490140845070423, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 49, 'https://': 2, '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': '7137362', 'n_tokens_mistral': 1102, 'n_tokens_neox': 1039, 'n_words': 242}