title: getServerSideProps() not running using component
body: <p>I'm making a small web app with Next.js and I'm not sure why, but <code>getServerSideProps()</code> isn't running when I use the component. I previously had the following code on a page in <code>/pages</code>, but I moved it to use as a component.</p>
  <pre><code>export const getServerSideProps = async () =&gt; {
    console.log(&quot;in getServerSideProps&quot;) // never shows
    let bans = await fetch('http://localhost:3000/api/get_bans').then((res) =&gt; {
      return res.json();
    })
  
    return {
      props: { bans: bans }
    }
  
  }
  
  const BansList = (listName, bans) =&gt; {
    
    bans = bans.bans
    console.log(bans) // undefined
    
    return (
      &lt;h1&gt;test&lt;/h1&gt;
    )
  
  }
  </code></pre>
  <p>I've stripped the code down to easily show what's wrong. When I use that as a component <code>getServerSideProps</code> isn't run, so <code>bans</code> is always undefined.</p>