keycloak-scim/js/apps/account-ui/test/utils.ts
Jon Koops c7361ccf6e
Run the Vite dev server through the Keycloak server (#27311)
Closes #19750
Closes #28643
Closes #30115

Signed-off-by: Jon Koops <jonkoops@gmail.com>
2024-06-12 11:55:14 +02:00

14 lines
368 B
TypeScript

import { generatePath } from "react-router-dom";
import { DEFAULT_REALM, ROOT_PATH, SERVER_URL } from "./constants";
export function getAccountUrl() {
return SERVER_URL + getRootPath();
}
export function getAdminUrl() {
return SERVER_URL + "/admin/master/console/";
}
export const getRootPath = (realm = DEFAULT_REALM) =>
generatePath(ROOT_PATH, { realm });