I think the main reason for double rendering is because of StrictMode in React (only in development mode). You can remove it in next.config.js

module.exports = {
  //reactStrictMode: true,
}