{"size": 1002, "ext": "js", "max_stars_repo_path": "js/components/client/Content.js", "max_stars_repo_name": "er361/mebel-na-zakaz", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "js/components/client/Content.js", "max_issues_repo_name": "er361/mebel-na-zakaz", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "js/components/client/Content.js", "max_forks_repo_name": "er361/mebel-na-zakaz", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.2692307692, "max_line_length": 56, "alphanum_fraction": 0.5289421158}
import React from 'react';
import Relay from 'react-relay';
import {Grid, Cell} from 'react-mdl';

import CategoryCard from './CategoryCard.js';

var content =  React.createClass({
  showData(data){
    console.log(data);
  },
  handleClick(){
    console.log('click');
  },
  render(){
    var categories = this.props.viewer.categorys;

    return(
      <div className='container' >
        <Grid>
          {categories.edges.map(edge=>
            <Cell key={edge.node.id} col={4} shadow={5}>
              <CategoryCard  categoryCard={edge.node} />
            </Cell>
          )}
        </Grid>
      </div>
    )
  }
})

export default Relay.createContainer(content, {
  prepareVariables(){
    return {
      limit: 100
    }
  },
  fragments: {
    viewer: () => Relay.QL `
    fragment on Viewer {
      categorys( first: $limit){
        count
        edges{
          node{
            id
            ${CategoryCard.getFragment('categoryCard')}
          }
        }
      }
    }`
  }
})
