1new URLSearchParams(location.search).get("your_query_param_key")
2______________________________________
3
4 if(location && location?.search?.includes("registration_token")){
5 const emailValue = new URLSearchParams(location.search).get("email")
6 const regTokenValue = new URLSearchParams(location.search).get("registration_token")
7
8 setValue("email", emailValue)
9 setValue("registration_token", regTokenValue)
10 console.log(regTokenValue, emailValue);
11 }
1const getQueryParams = () => window.location.search.replace('?', '').split('&').reduce((r,e) => (r[e.split('=')[0]] = decodeURIComponent(e.split('=')[1]), r), {});
2