title: Nextjs conditional rendering of data
body: <p>I am trying to render data from an API, I have the data as a JSON if it loads plus I push an element if the fetch is successful</p>
  <pre><code>{status: 'success'}
  </code></pre>
  <p>If the fetch is not I push this</p>
  <pre><code>{status : 'failed}
  </code></pre>
  <p>When I try to render it on my main function like this</p>
  <pre><code>if(data.status === 'success'){
  return &lt;div&gt; data &lt;/div&gt;
  } else if(data.status === 'failed'){
  return &lt;div&gt; not data &lt;/div&gt;
  }
  </code></pre>
  <p>It gives me an error that I have nothing to return.</p>