Now, when i use a RegExp routes, i cannot use openPage or redirectPage functions. Router throws RegExp routes are not supported. So may be we can support this by adding second converter to route? Something like this:
export const $router = createRouter({
profile: [/\/(student|teacher|manager)\/profile/, (urlRole) => { return { role: urlRole }}, (urlRole) => `/${urlRole}/profile`],
where it is ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
})
So router can determine the redirect url and do redirect?
Now, when i use a RegExp routes, i cannot use
openPageorredirectPagefunctions. Router throwsRegExp routes are not supported. So may be we can support this by adding second converter to route? Something like this:So router can determine the redirect url and do redirect?