Skip to content

Commit 8b6e504

Browse files
authored
Merge pull request #10987 from COil/patch-1
docs: added absolute URL example in useRedirect hook
2 parents 56b8f0e + 77c8db9 commit 8b6e504

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/ra-core/src/routing/useRedirect.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ export type RedirectionSideEffect = CreatePathType | false | RedirectToFunction;
3030
* redirect(false);
3131
* // redirect to the result of a function
3232
* redirect((resource, id, data) => ...)
33+
* // redirect to an absolute URL
34+
* redirect('https://marmelab.com/react-admin');
3335
*/
3436
export const useRedirect = () => {
3537
const navigate = useNavigate();

0 commit comments

Comments
 (0)