<commit_before>import React from 'react';
import AutoComplete from 'material-ui/AutoComplete';
import _ from 'underscore';


const Search = (props) => {
  let data = props.data;
  let store = [];
  let keys = _.each(data, (obj) => 
    _.each(obj, (key) => store.push(key)))


  return (
    <div className="search">
      <AutoComplete
        floatingLabelText="Search by category, activity, location, date and time"
        filter={AutoComplete.fuzzyFilter}
        dataSource={store}
        maxSearchResults={5}
        fullWidth={true}

        style={{
          color: 'white',
          padding: '20px',
          targetOrigin: 'top'
        }}
      />
    </div>
  )
}

export {Search};<commit_msg>Added search and formatted time<commit_after>import React from 'react';
import AutoComplete from 'material-ui/AutoComplete';
import _ from 'underscore';

let transform = (date) => {
  let time = new Date(date + 'UTC');
  return time.toString()
}

const Search = (props) => {
  let data = props.data;
  let store = [];
  let keys = _.each(data, function(obj) {
     _.each(obj, function(value, key) {
      if (key !== "image") {
        if (key === "time") {
        transform(obj[key])
        
        }
        store.push(value) 
      }
    })
  })
     


  return (
    <div className="search">
      <AutoComplete
        floatingLabelText="Search by category, activity, location, date and time"
        filter={AutoComplete.fuzzyFilter}
        dataSource={store}
        maxSearchResults={5}
        fullWidth={true}

        style={{
          color: 'white',
          padding: '20px',
          targetOrigin: 'top'
        }}
      />
    </div>
  )
}

export {Search};
{'fraction_non_alphanumeric': 0.1408284023668639, 'fraction_numerical': 0.0035502958579881655, 'mean_word_length': 2.302734375, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 14, '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': '4405601', 'n_tokens_mistral': 519, 'n_tokens_neox': 506, 'n_words': 125}