Route Check - Redirect
Hi all.
Have to ask here - since I think I'm missing it in the docs...
I wanted to ask if I can somehow check if the trigerred route was redirected to or was it a direct URL input?
I would love to make sure that the route was redirected to and not manually triggered.
Cheers!
3 Replies
optimistic-gold•6mo ago
out of interest, why would that make a difference?
and what happens if, after a redirect, the user refreshes the page?
magic-amberOP•6mo ago
The page would check if the page was redirected to. If not I send the user to another page.
I’m assuming now that the router state is not preserved when reloading the page.
If state is preserved I would also add a state to check if the action was alredy done.
If not I would keep them on the page else away they go.
optimistic-gold•6mo ago
router.state.redirect
should have the info you are looking for