I'm trying to create a page that renders information dynamically by drawing from a local dataset using params.get(""). While the URL is set, whatever parameter I put in params.get("") does not render on the page.
Here is the code for directing the user to whatever parameter has been set
<button onClick={e => nav(`/learn?url=${item.place}`)} className='absolute bottom-5 right-5 text-green-300 bg-[#0F1014] p-2 rounded-sm ease-in-out duration-150 hover:bg-green-900 text-sm'>Learn more</button>
Below is the code for the page
function Learn() {
const [params] = useSearchParams();
console.log(params.get("place"))
return (
<div>
<h1>{params.get("place")}</h1>
</div>
)
}```
I tried changing the parameters but it did not help with what I was trying to get done. Any help or advice is much appreciated.