How to redirect and pass search params?
I have a legacy route that has to be redirected to a new route, and I need to pass all search params passed to that route, how do I achieve this using a zod validator?
4 Replies
adverse-sapphire•4mo ago
throw a redirect in its beforeLoad
equal-aqua•4mo ago
Oh, I have a similar case! I have legacy search params, and I want to remove them from the URL if they don’t pass up-to-date validation. Is it possible to trigger a redirect from
validateSearch to do that? Or is there a better way?sunny-greenOP•4mo ago
Just doing a redirect removes all search params though
Does the trick
adverse-sapphire•4mo ago
search: true should work too