<commit_before>/*
 * Copyright 2017-present, Hippothesis, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
 */

'use strict';

import React, { Component } from 'react';
import { View, Image } from 'react-native';
import { connect } from 'react-redux';
import { Container, Content, Text, Item, Input, InputGroup, Button, Grid, Row, Col } from 'native-base';

import Images from '../constants/Images';
import IngredientSelector from './IngredientSelector';

import { searchRecipes } from '../actions/RecipeSearchResultsActions';

class RecipeSearchView extends Component {

  constructor(props) {
    super(props);
    console.log("props", props);
  }

  search() {
    console.log("TESTEST", this);
    this.props.searchRecipes({
      limitLicense: false,
      number: 5,
      offset: 0,
      query: "burger"
    }).then(() => {
      console.log("results = ", this.props.recipes);<commit_msg>search by ingredients working<commit_after>/*
 * Copyright 2017-present, Hippothesis, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
 */

'use strict';

import React, { Component } from 'react';
import { View, Image } from 'react-native';
import { connect } from 'react-redux';
import { Container, Content, Text, Item, Input, InputGroup, Button, Grid, Row, Col } from 'native-base';

import Images from '../constants/Images';
import IngredientSelector from './IngredientSelector';

import { searchRecipes } from '../actions/RecipeSearchResultsActions';

class RecipeSearchView extends Component {

  constructor(props) {
    super(props);
    console.log("props", props);
  }

  search() {
    console.log("TESTEST", this);
    this.props.searchRecipes({
      limitLicense: false,
      number: 5,
      offset: 0,
      includeIngredients: "chicken, rice"
    }).then(() => {
      console.log("results = ", this.props.recipes);
{'fraction_non_alphanumeric': 0.13208453410182516, 'fraction_numerical': 0.005763688760806916, 'mean_word_length': 3.7020316027088036, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2956824', 'n_tokens_mistral': 616, 'n_tokens_neox': 598, 'n_words': 193}