Получить параметры поиска от url React
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