By default in next.js the log will come twice, let’s see how to fix it.
Got to next.config.mjs add this code
reactStrictMode:false,
If you don’t have any other setting then you can skip the (,) if not then add a comma. Whenever you edit this file, your project will get restarted.
Now you should see only a single entry in your console.