title: Two sets of ID's in next js for rendering different pages in next.js
body: <p>I want to do something like this if possible.</p>
  <pre><code>//file1
  function Component1(){...}
  //file2
  function Component2(){...}
  
  //pages/[id]
  
  export default function () {
  //fetch data
  if(data &amp;&amp; data.category){
    return Component1
  }
  if(data &amp;&amp; data.product) {
    return Component2
  }
  
  return &lt;h1&gt;Bad page&lt;/h1&gt;
  }
  </code></pre>
  <p>Is this possible in Next.js or do I need to make separate page routes? Is this were static site generation would be used?</p>