Dapatkan kueri dari url react router dom v6
React Router Dom v6
import { useSearchParams } from 'react-router-dom'
//url = http://localhost:3000/main/ride?type=send
let [searchParams, setSearchParams] = useSearchParams();
console.log(searchParams.get('type')); // send
CodePadding