How to use the react-jhipster.getUrlParameter function in react-jhipster

To help you get started, we’ve selected a few react-jhipster examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jhipster / jhipster-sample-app-react / src / main / webapp / app / modules / account / activate / activate.tsx View on Github external
useEffect(() => {
    const key = getUrlParameter('key', props.location.search);
    props.activateAction(key);
    return () => {
      props.reset();
    };
  }, []);
github jhipster / jhipster-sample-app-react / src / main / webapp / app / modules / account / password-reset / finish / password-reset-finish.tsx View on Github external
export const PasswordResetFinishPage = (props: IPasswordResetFinishProps) => {
  const [password, setPassword] = useState('');
  const [key] = useState(getUrlParameter('key', props.location.search));

  useEffect(() => () => props.reset(), []);

  const handleValidSubmit = (event, values) => props.handlePasswordResetFinish(key, values.newPassword);

  const updatePassword = event => setPassword(event.target.value);

  const getResetForm = () => {
    return (