<commit_before>import React, {Component} from 'react';
import {View, StyleSheet, Button } from 'react-native';
import { Header, SmallHeader, ColumnGrid} from './common';
import { NewEntryDialogue } from './common'
const pantryData = require('../../dummy_data/dummy_data_1.json');

const styles = StyleSheet.create({
  container: {
    paddingTop: 20,
    flex: 1,
    backgroundColor: '#42a5f5',
  },
  viewAllButton: {
    alignItems: 'center',
    margin: 20
  },

});

class Pantry extends Component {
  constructor(props) {
    super(props);
    this.state = {
      viewingAllItems: false,
    };
  }

  render() {
    if (!this.state.viewingAllItems) {
      return (
        <View style={styles.container}>
          <Header headerText="Pantry" button1="plus"/>

          {/* Expiring food view (May add horizontal scrolling) */}
          <SmallHeader headerText="Expiring Soon"/>
          <ColumnGrid
            items={pantryData.expiringFood}
            columns={4}
            vertical={true}
          />

          {/* Recently added food view (May add horizontal scrolling) */}
          <SmallHeader headerText="Recently Added"/>
          <ColumnGrid
            items={pantryData.newPantryItems}
            columns={4}
            vertical={true}
            style={{}}
          />

          <View style={styles.viewAllButton}>
            <Button
              onPress={() => this.handleViewAll()}
              title="View All"
            />
          </View>
        </View>
      );
    }


    return (
      <View style={styles.container}>
        <Header headerText="Pantry" button1="magnify" buttonOneDisplayContent="newEntry" />
        <ColumnGrid
          items={pantryData.fullPantry}
          columns={4}
          vertical={true}
        />

        <View style={styles.viewAllButton}>
          <Button
            onPress={() => this.handleViewAll()}
            title="< New & Old"
          />
        </View>
      </View>
    );
  }
  // Place holder for button handler
  handleViewAll() {
    this.setState({
      viewingAllItems: !this.state.viewingAllItems,
    });
  }

  handleNewEntry() {
    return(
      <NewEntryDialogue/>
    );
  }
}


export default Pantry;<commit_msg>House Keeping<commit_after>import React, {Component} from 'react';
import {View, StyleSheet, Button } from 'react-native';
import { Header, SmallHeader, ColumnGrid} from './common';
const pantryData = require('../../dummy_data/dummy_data_1.json');

const styles = StyleSheet.create({
  container: {
    paddingTop: 20,
    flex: 1,
    backgroundColor: '#42a5f5',
  },
  viewAllButton: {
    alignItems: 'center',
    margin: 20
  },

});

class Pantry extends Component {
  constructor(props) {
    super(props);
    this.state = {
      viewingAllItems: false,
    };
  }

  render() {
    if (!this.state.viewingAllItems) {
      return (
        <View style={styles.container}>
          <Header headerText="Pantry" button1="plus"/>

          {/* Expiring food view (May add horizontal scrolling) */}
          <SmallHeader headerText="Expiring Soon"/>
          <ColumnGrid
            items={pantryData.expiringFood}
            columns={4}
            vertical={true}
          />

          {/* Recently added food view (May add horizontal scrolling) */}
          <SmallHeader headerText="Recently Added"/>
          <ColumnGrid
            items={pantryData.newPantryItems}
            columns={4}
            vertical={true}
            style={{}}
          />

          <View style={styles.viewAllButton}>
            <Button
              onPress={() => this.handleViewAll()}
              title="View All"
            />
          </View>
        </View>
      );
    }


    return (
      <View style={styles.container}>
        <Header headerText="Pantry" button1="magnify" />
        <ColumnGrid
          items={pantryData.fullPantry}
          columns={4}
          vertical={true}
        />

        <View style={styles.viewAllButton}>
          <Button
            onPress={() => this.handleViewAll()}
            title="< New & Old"
          />
        </View>
      </View>
    );
  }
  // Place holder for button handler
  handleViewAll() {
    this.setState({
      viewingAllItems: !this.state.viewingAllItems,
    });
  }

}


export default Pantry;
{'fraction_non_alphanumeric': 0.13430758524704245, 'fraction_numerical': 0.006958942240779402, 'mean_word_length': 1.9493844049247606, 'pattern_counts': {'":': 0, '<': 40, '<?xml version=': 0, '>': 42, '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': '2113568', 'n_tokens_mistral': 1249, 'n_tokens_neox': 1220, 'n_words': 256}