useRedirect() is defined like this:
export function useRedirect(
predicateUrl: string | null,
targetUrl: string,
{
query,
replace = true,
merge = true,
state,
}: { query?: QueryParam; replace?: boolean; merge?: boolean; state?: unknown } = {},
)
There's also a UseRedirectProps export, which looks like this:
export interface UseRedirectProps {
predicateUrl: string
targetUrl: string
queryParams?: QueryParam | URLSearchParams
replace?: boolean
state?: unknown
}
I don't use TypeScript, but it looks like the shape of UseRedirectProps doesn't match the shape of useRedirect()'s actual props. (query, replace, merge, and state are expected to be passed in a separate object)
Just FYI.
I probably don't have time to fix this, but I think it'd be an easy win for someone who is familiar with TypeScript :)
useRedirect()is defined like this:There's also a
UseRedirectPropsexport, which looks like this:I don't use TypeScript, but it looks like the shape of
UseRedirectPropsdoesn't match the shape ofuseRedirect()'s actual props. (query,replace,merge, andstateare expected to be passed in a separate object)Just FYI.
I probably don't have time to fix this, but I think it'd be an easy win for someone who is familiar with TypeScript :)