get query params from url nextjs code example
Example: get values form query params in next js
import { useRouter } from 'next/router';
const { query } = useRouter();
console.log(query.search) // for www.abc.com?search=xyz
import { useRouter } from 'next/router';
const { query } = useRouter();
console.log(query.search) // for www.abc.com?search=xyz