title: NextJS getStaticProps() is not called after params change
body: <p>In my web app, front end is conected with Contentful cms to gather data about some products.</p>
  <p>This is part of my directory configuration /pages/[category]/items/[id]</p>
  <p>Inside /pages/[category] is located Index.tsx with some code:</p>
  <pre><code>// Page component
  
  interface ProductsIndexProps {
      products: ProductItemModel[],
      totalPages: number,
      currentPage: number
  }
  
  export default function ProductsIndex(props: ProductsIndexProps) {
  
      const { products, totalPages, currentPage } = props;
  
      const router = useRouter();
  
      return (
          &lt;div&gt;
              &lt;div className={styles.title_section}&gt;
                  &lt;h2 className={styles.title}&gt;Results for all items&lt;/h2&gt;
              &lt;/div&gt;
  
              &lt;div className={styles.list_container}&gt;
                  &lt;section className={styles.list_sidebar}&gt;&lt;/section&gt;
                  &lt;ProductList
                      products={products}
                      category={asString(router.query.category || &quot;&quot;) || &quot;&quot;}
                      currentPage={currentPage}
                      totalPages={totalPages}
                  /&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      );
  }
  
  ...
  export const getStaticPaths: GetStaticPaths = async () =&gt; {
  
      return {
          paths: [
              { params: { category: &quot;laptops&quot; } },
              { params: { category: &quot;motorcycle&quot; } },
              { params: { category: &quot;accessories&quot; } },
          ],
          fallback: false,
      }
  }
  
  export const getStaticProps: GetStaticProps = async (context) =&gt; {
  
      const category = context.params?.category || &quot;&quot;;
      const productsData = await getPaginatedProducts(1, category);
      const envPag = process.env.pagination || '0';
      const totalPages = Math.ceil(productsData.total / parseInt(envPag));
  
      return {
          props: {
              products: productsData.items,
              totalPages,
              currentPage: 1
          },
      }
  }
  
  </code></pre>
  <p>All I want is to, dependly on &quot;category&quot; param, call getPaginatedProducts and send data to my page [category].tsx.</p>
  <p><strong>What I want</strong>, when I head to /laptops -&gt; getPaginatedProducts is called and returns laptops data
  and also
  when I head to /motorcycle -&gt; getPaginatedProducts is called and returns motorcycle data</p>
  <p>The problem is, getPaginatedProducts function is always fired and returns data, but Next.js getStaticProps don't send data when url change.</p>
  <p>Basicly, if I head to /laptops I get laptops data properly but if I head after that to /motorcycle the data inside [category].tsx remains the same(laptops). Only after page refresh data is properly fetched.</p>
  <p>Is there any way around this or some other solution?</p>