I am working on Reactjs and using nextjs framework,Right now i want if url containing "?id=pinned" then different text should display,How can i do this ? Here is my current code in [slug.js]
return(
if(url containing pinned)
{
<div id="neww" className="neww"><h3>Pinned</h3></div>
}
else
{
<div id="neww" className="neww"><h3>Newest</h3></div>
}
)