Javascript – how to get current url in nextjs without using window.location.href or react router
how to get current url in nextjs without using window.location.href or react router const parse = require("url-parse"); parse("hostname", {}); console.log(parse.href);