I am trying to create a component that will search a REST API through an axios request, and then return a list of the results. Right now, I'm facing an issue where all I am getting when I search is 'undefined' and I have no clue why. Any and all suggestions would be amazing.
Users.js
import React, { Component } from 'react';
import axios from 'axios';
import { search } from './utils';
import Users from './UsersDelete';
class App extends Component {
  state = {
    users: null,
    loading: false,
    value: ''
  };
  search = async val => {
    this.setState({ loading: true });
    const res = await search(
      `https://zuul-stage.whatifops.com/v1/user/email/${val}`
    );
    const users = await res.data.results;
    this.setState({ users, loading: false });
  };
  onChangeHandler = async e => {
    this.search(e.target.value);
    this.setState({ value: e.target.value });
  };
  get renderUsers() {
    let users = <h1>There's no movies</h1>;
    if (this.state.movies) {
      users = <Users list={this.state.users} />;
    }
    return users;
  }
  render() {
    return (
      <div>
        <input
          value={this.state.value}
          onChange={e => this.onChangeHandler(e)}
          placeholder='Type something to search'
        />
        {this.renderUsers}
      </div>
    );
  }
}
export default App;
User.js
import React from 'react';
import { truncStr } from './utils';
const User = props => {
  const { id, email, phone } = props.item;
  return (
    <div className={classes.Container}>
      <div className={classes.VoteContainer}>
        <span className={classes.Vote}>{email}</span>
      </div>
      <div className={classes.Bottom}>
        <h3 className={classes.Title}>{truncStr(phone, 19)}</h3>
      </div>
    </div>
  );
};
export default User;
UsersDelete.js
import React from 'react';
import User from './User';
const Users = ({ list }) => {
  let cards = <h3>Loading...</h3>;
  if (list) {
    cards = list.map((m, i) => <User key={i} item={m} />);
  }
  return (
    <div>
      <div>{cards}</div>
    </div>
  );
};
export default Users;
utils.js
import axios from 'axios';
export const truncStr = (string, limit) => {
  return string.length > limit
    ? string
        .trim()
        .substring(0, limit - 3)
        .trim() + '...'
    : string;
};
const resources = {};
const makeRequestCreator = () => {
  let cancel;
  return async query => {
    if (cancel) {
      // Cancel the previous request before making a new request
      cancel.cancel();
    }
    // Create a new CancelToken
    cancel = axios.CancelToken.source();
    try {
      if (resources[query]) {
        // Return result if it exists
        return resources[query];
      }
      const res = await axios(query, { cancelToken: cancel.token });
      const result = res.data.results;
      // Store response
      resources[query] = result;
      return result;
    } catch (error) {
      if (axios.isCancel(error)) {
        // Handle if request was cancelled
        console.log('Request canceled', error.message);
      } else {
        // Handle usual errors
        console.log('Something went wrong: ', error.message);
      }
    }
};
};
export const search = makeRequestCreator();
**Update: This is the response info after I called console.log(res) after the search function 

 
    