title: Trending shows search results with "Trending" instead of sorting by Trending in TDMB API
body: <p>So I am creating a react-moviedb-app.I just added the feature for searching movies on the basis of text entered using the <code>search</code> API from TDMB.And now I am getting the page renderded with movies with <code>query=trending</code> instead of sorting by trending using trending API from TDMB.</p>
  <p>This is my code:</p>
  <p><code>App.js</code></p>
  <pre><code>
  function App() {
    const [category, setCategory] = useState('popular')
  
    let fetchCategory
    if(category === &quot;trending&quot;){
      fetchCategory = category +  &quot;/movie/week?api_key=&quot; + API_KEY 
    }
    if(category === &quot;top_rated&quot; || category === &quot;upcoming&quot; || category === &quot;popular&quot;){
      fetchCategory = &quot;movie/&quot; + category + &quot;?api_key=&quot; + API_KEY + &quot;&amp;language=en-US&amp;page=1&quot;;
    }
    else {
      fetchCategory = &quot;search/movie?query=&quot; + category + &quot;&amp;api_key=&quot; + API_KEY + &quot;&amp;language=en-US&amp;page=1&amp;include_adult=false&quot;;
    }
    
    return (
      &lt;movieContext.Provider value={{category : [category, setCategory], fetchCategory}}&gt;
        &lt;div className=&quot;App&quot;&gt;
          &lt;Navbar /&gt;
          &lt;div className=&quot;movie-container&quot;&gt; 
            &lt;Movie /&gt; 
          &lt;/div&gt; 
        &lt;/div&gt;    
      &lt;/movieContext.Provider&gt;
      
    );
  }
  
  export default App;
  </code></pre>
  <p>Navbar &gt; <code>SearchBar.js</code></p>
  <pre><code>import React from 'react'
  import { AiOutlineSearch } from 'react-icons/ai';
  import { movieContext } from '../App'
  import { useContext } from 'react'
  
  const SearchBar = () =&gt; {
  
      const {category, fetchCategory} = useContext(movieContext);
      const [stateCategory, setStateCategory] = category;
  
      const handleSearch = (e) =&gt; {
          if(e.keyCode === 13){
              setStateCategory(e.target.value)
              console.log(e.target.value)
          }
      }
  
      return (
          &lt;div className=&quot;search-box&quot;&gt;
              &lt;AiOutlineSearch style={{backgroundColor: &quot;#212121&quot;}} /&gt; 
              &lt;input onKeyDown={handleSearch} type=&quot;text&quot; placeholder=&quot;Press Enter to Search&quot; className=&quot;search-bar&quot;/&gt;
          &lt;/div&gt;
      )
  }
  
  export default SearchBar
  
  </code></pre>
  <p>Before adding the search functionality everything was fine.This is only the case with <code>Trending</code>,rest categories are working fine</p>