i am using next js and i want to make human readble urls like the urls of stackoverflow questions for each of my webpages using "-" betwwen each words but i dont know how to do it corrently my url looks like this
localhost:3001/Morbius%OTT%release%date%confirmed%3F
i want to convert this in to this
localhost:3001/Morbius-OTT-release-date-confirmed-?
<div className="question11">
{data.map((itm) => (
<Link
key={itm._id}
href={{
pathname: "query/[itm]",
}}
as={`/${encodeURIComponent(itm.Name)}`}
>
<Alert className="question13">{itm.Name}</Alert>
</Link>
))}
</div>