Skip to content

Commit 70512cd

Browse files
authored
Merge pull request #56 from MohammedFaragallah/patch-1
[TypeScript] Allow react-router To type for UseRedirectIfAuthenticatedOptions
2 parents ac92360 + 199a3e5 commit 70512cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/ra-supabase-core/src/useRedirectIfAuthenticated.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useCheckAuth } from 'ra-core';
22
import { useEffect } from 'react';
3-
import { useNavigate } from 'react-router';
3+
import { To, useNavigate } from 'react-router';
44

55
/**
66
* This hook redirect the user to the provided path (/ by default) if they are authenticated.
@@ -30,4 +30,4 @@ export const useRedirectIfAuthenticated = (
3030
}, [checkAuth, navigate, redirectTo]);
3131
};
3232

33-
export type UseRedirectIfAuthenticatedOptions = string;
33+
export type UseRedirectIfAuthenticatedOptions = To;

0 commit comments

Comments
 (0)