mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
9ae2096d2a
This refactoring simplify the code of the frontend and prepare the portal for receiving a user settings page and an admin page.
10 lines
327 B
TypeScript
10 lines
327 B
TypeScript
import queryString from "query-string";
|
|
import { useLocation } from "react-router";
|
|
|
|
export function useRedirectionURL() {
|
|
const location = useLocation();
|
|
const queryParams = queryString.parse(location.search);
|
|
return (queryParams && "rd" in queryParams)
|
|
? queryParams["rd"] as string
|
|
: undefined;
|
|
} |