parent
b0d8c342ac
commit
445c27c69e
@ -1,8 +1,8 @@
|
||||
import { useSearchParams } from 'next/navigation';
|
||||
|
||||
export const useLoginRedirect = () => {
|
||||
export const useLoginRedirect: () => string | null = () => {
|
||||
const searchParams = useSearchParams();
|
||||
const redirect = searchParams.get('redirect');
|
||||
if (!redirect) return '/';
|
||||
if (!redirect) return null;
|
||||
return redirect;
|
||||
};
|
||||
|
Loading…
Reference in new issue