<commit_before>import React from 'react'
import MakeIt from '../containers/MakeIt'
import { Link } from 'react-router'
//material UI things
import Paper from 'material-ui/paper'
import { GridList, GridTile } from 'material-ui/GridList'
import IconButton from 'material-ui/IconButton';
import RaisedButton from 'material-ui/RaisedButton';

const styles = {
  root: {
    display: 'flex',
    flexWrap: 'wrap',
    justifyContent: 'space-around',
    flexDirection: 'column',
    alignItems: 'center',
  },
  gridList: {
    width: 600,
    // height: 450,
    paddingBottom: 50,
    overflowY: 'auto',
  },
  page: {
    marginLeft: 150,
    marginRight: 150,
    marginBottom: 50,
  }
}

export default function (props) {

    const sortedRecipes = props.sortedRecipes.filter(function(recipe) {
      console.log("recipe", recipe.user_id)
      console.log("AUTH ID", props.auth.id)
      if(props.auth.id === recipe.user_id){
        console.log("INSIDE IF")
        return recipe
      }
    }) || {}

    console.log("Props", props)
    console.log("sortedRecipes", sortedRecipes)
    return (
      <div>
        <Paper style={styles.page} zDepth={4}>
          <div style={styles.root}>
            <span><h1 id="chefHeadTesk">Little Chef says you should...</h1></span>
              <GridList
                cols={2}
                cellHeight={200}
                padding={1}
                style={styles.gridList}>
                {sortedRecipes.map((recipe) => (
                  <GridTile
                    key={recipe.id}
                    title={`Make ${recipe.name}`}
                    subtitle={<Link to={`makeit/${recipe.id}`}><h1 tabIndex='0' id="grid-box-hover">Yum! Text me the recipe!</h1></Link>}
                    titlePosition="bottom"
                    titleBackground="linear-gradient(to top, rgba(0,0,0,0.9) 0%,rgba(0,0,0,0.5) 70%,rgba(0,0,0,0) 100%)"
                    cols={recipe.featured ? 2 : 1}
                    rows={recipe.featured ? 2 : 1}>
                    <img src={recipe.photo} />
                  </GridTile>
                ))}
              </GridList>
            </div>
         </Paper>
      </div>
    )
}<commit_msg>added no recipes tag<commit_after>import React from 'react'
import MakeIt from '../containers/MakeIt'
import { Link } from 'react-router'
//material UI things
import Paper from 'material-ui/paper'
import { GridList, GridTile } from 'material-ui/GridList'
import IconButton from 'material-ui/IconButton';
import RaisedButton from 'material-ui/RaisedButton';

const styles = {
  root: {
    display: 'flex',
    flexWrap: 'wrap',
    justifyContent: 'space-around',
    flexDirection: 'column',
    alignItems: 'center',
  },
  gridList: {
    width: 600,
    // height: 450,
    paddingBottom: 50,
    overflowY: 'auto',
  },
  page: {
    marginLeft: 150,
    marginRight: 150,
    marginBottom: 50,
  }
}

export default function (props) {

    const sortedRecipes = props.sortedRecipes.filter(function(recipe) {
      console.log("recipe", recipe.user_id)
      console.log("AUTH ID", props.auth.id)
      if(props.auth.id === recipe.user_id){
        console.log("INSIDE IF")
        return recipe
      }
    })

    return (
      <div>
        <Paper style={styles.page} zDepth={4}>
          <div style={styles.root}>
            <span><h1 id="chefHeadTesk">Little Chef says you should...</h1></span>
              {sortedRecipes.length !== 0 ? <GridList
                cols={2}
                cellHeight={200}
                padding={1}
                style={styles.gridList}>
                {sortedRecipes.map((recipe) => (
                  <GridTile
                    key={recipe.id}
                    title={`Make ${recipe.name}`}
                    subtitle={<Link to={`makeit/${recipe.id}`}><h1 tabIndex='0' id="grid-box-hover">Yum! Text me the recipe!</h1></Link>}
                    titlePosition="bottom"
                    titleBackground="linear-gradient(to top, rgba(0,0,0,0.9) 0%,rgba(0,0,0,0.5) 70%,rgba(0,0,0,0) 100%)"
                    cols={recipe.featured ? 2 : 1}
                    rows={recipe.featured ? 2 : 1}>
                    <img src={recipe.photo} />
                  </GridTile>
                ))}
              </GridList> : <h1>Add some recipes because you don't have any</h1> }
            </div>
         </Paper>
      </div>
    )
}
{'fraction_non_alphanumeric': 0.14840182648401826, 'fraction_numerical': 0.023972602739726026, 'mean_word_length': 1.9641407307171854, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 45, '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': '7217422', 'n_tokens_mistral': 1460, 'n_tokens_neox': 1352, 'n_words': 277}