content: import React, { Component } from 'react';
  import SearchBar from './SearchBar';
  import SubmitButton from './SubmitButton';
  import Radium from 'radium';
  import t_fetch from '../utils/t_fetch';
  
  
  let st = {
    padding: '15px',
    height: '75px',
    backgroundColor: '#E9F1F9',
  };
  
  let stContainer = {
    height: '100%',
    display: 'flex',
    outline: 'none',
    margin: '0',
    width: '100%',
    appearance: 'none',
    boxShadow: 'none',
    borderRadius: 'none',
    backgroundColor: '#F5F8FA',
    borderTop: 'none',
    borderLeft: 'none',
    borderRight: 'none',
    overflow: 'none',
    borderBottom: 'solid 2px #CBDDEE',
    transition: 'borderBottom 0.7s, backgroundColor 0.7s',
    ':focus': {
      backgroundColor: 'white',
      borderBottom: 'solid 3px #3D9BC7',
    }
  };
  
  class SearchForm extends Component {
    state = {
      searchQuery: '',
      tweets: null,
      users: null,
    }
  
    _handleChange = (event) => {
      this.setState({ searchQuery: event.target.value });
    }
    _handleClick = (event) => {
      event.preventDefault();
      this.searchQuery = this.state.searchQuery;
      if (!this.searchQuery) return;
      console.log('fix svg button');
      // let tweets = this.search.tweets(this.state.searchQuery);
      // let users = this.search.users(this.state.searchQuery);
      // this.setState({searchQuery: '', tweets, users});
      // Get JSON data using wrapper functions (fetch)
      Promise.all([
        t_fetch('GET', '/search/users.json', this.searchQuery),
        //t_fetch('GET', 'users/search.json', this.searchQuery)
      ])
        .then((data) => {
          console.log("Promise resolved with: ", data);
          let tweets = data[0];
          //let users = data[1];
          // Clear text field, pass data to state
          this.setState({ tweets });
        })
        .catch((error) => {
          console.log('Failed to fetch user data: ', error.message);
      });
    }
    render() {
      return (
        <div>
          <form style={st}>
            <div
              style={stContainer}
              name='container'>
              <SearchBar
                onChange={this._handleChange}
                value={this.state.searchQuery} />
              <SubmitButton onClick={this._handleClick} />
            </div>
          </form>
          { // Search results
            this.props.children
          }
        </div>
      );
    }
  }
  
  export default Radium(SearchForm);
  