generated from archtechx/template
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible to pass a URL to redirect function? #53
Comments
I think the above should work okay, however, I've found that I need to set the Try the following: const props = defineProps({ redirectUrl: String })
const { show, close, redirect, vnode } = useModal()
const handleRedirect = () => {
if (props.redirectUrl) {
vnode.value = false
router.get(props.redirectUrl)
} else {
redirect()
}
} I agree that a url parameter for the redirect function would be good though. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a situation where i redirect users conditionally. Would love know if there is a possibility to optionally pass a URL to the redirect() function of useModal() so that it redirects to intended page instead of baseRoute.
Here is what i am trying as a word around.
The text was updated successfully, but these errors were encountered: