<commit_before>import React, { Component } from 'react';
import Restaurant from './Restaurant';

class RestaurantList extends Component {
 	constructor(props) {
 		super(props);
    this.onInputChange = this.onInputChange.bind(this);
    this.onFormSubmit = this.onFormSubmit.bind(this);
 		this.state = {
      searchInput: ''
    };
 	}

 	onInputChange(event) {
 		this.setState({ searchInput: event.target.value });
 	}

 	onFormSubmit(event) {
 		event.preventDefault();
    const { fetchRestaurants } = this.props.searchActions;

 		fetchRestaurants(this.state.searchInput);

 		this.setState({ searchInput: '' });
 	}

 	render() {
 		let restaurant = this.props.restaurants.map((restaurant, index) => {
 			return (
 				<Restaurant
          name={restaurant.name}
          key={index} />
 			)
 		})

    let searchError = this.props.searchErrorMsg ? (
      <p>
        No Restaurants Found!
      </p>) : null;

 		return (
 			<div><commit_msg>[fix] fixes logout and searchbar bug<commit_after>import React, { Component } from 'react';
import Restaurant from './Restaurant';

class RestaurantList extends Component {
 	constructor(props) {
 		super(props);
    this.onInputChange = this.onInputChange.bind(this);
    this.onFormSubmit = this.onFormSubmit.bind(this);
 		this.state = {
      searchInput: ''
    };
 	}

 	onInputChange(event) {
 		this.setState({ searchInput: event.target.value });
 	}

 	onFormSubmit(event) {
 		event.preventDefault();
    const { fetchRestaurants } = this.props.searchActions;

 		fetchRestaurants(this.state.searchInput);

 		this.setState({ searchInput: '' });
 	}

 	render() {
 		let restaurant = this.props.restaurant ? this.props.restaurant.map((restaurant, index) => {
 			return (
 				<Restaurant
          name={restaurant.name}
          key={index} />
 			)
 		}) : null;

    let searchError = this.props.searchErrorMsg ? (
      <p>
        No Restaurants Found!
      </p>) : null;

 		return (
 			<div>
{'fraction_non_alphanumeric': 0.13553299492385787, 'fraction_numerical': 0.0, 'mean_word_length': 2.942, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '2252270', 'n_tokens_mistral': 705, 'n_tokens_neox': 632, 'n_words': 112}