title: location is not defined error in react + next js?
body: <p>I am trying to send some text on basic of <code>hosted url</code> (where my build is deployed).but i am getting this error
  <strong>ReferenceError: location is not defined</strong>
  here is my code</p>
  <p><a href="https://codesandbox.io/s/laughing-mendel-pf54l?file=/pages/index.js" rel="noreferrer">https://codesandbox.io/s/laughing-mendel-pf54l?file=/pages/index.js</a></p>
  <pre><code>export const getStaticProps = async ({ preview = false, previewData = {} }) =&gt; {
    return {
      revalidate: 200,
      props: {
        //req.host
        name: location.hostname == &quot;www.google.com&quot; ? &quot;Hello&quot; : &quot;ccccc&quot;
      }
    };
  };
  </code></pre>