router.replace() causes infinite loop in nextjs application (index.js file)
router.replace seems to be causing infinite loop on application start, it appends the path from localhost:3000 to http://localhost:3000/dashboard and the application runs in infinite loop.