How to redirect to thank you page in Vue3.js

Viewed 196

How can I create a redirect to another page on Vue?

Below I would like to insert a redirect after user login.

async function normalLoginClicked() {
  if(agreePrivacyPolicy.value) {
    ps_loading_dialog.value.openModal();

    await userProvider.loginWithEmailId(email.value, password.value);        
                
    ps_loading_dialog.value.closeModal();
    if (userProvider.userResource.status == PsStatus.SUCCESS) {
      redirect();           
    }
}
        

function redirect() {
  userProvider.navigateUserLoginRedirect(route.query.redirect, 'dashboard', router, route.query.redirect, route.query, route.params);
}
1 Answers
Related