e6d8ffb202
* initial version of the scopes screen * added scopes edit details * Update src/clients/authorization/MoreLabel.tsx Co-authored-by: Jon Koops <jonkoops@gmail.com> * pr review * Update src/clients/routes/NewScope.ts Co-authored-by: Jon Koops <jonkoops@gmail.com> * Update src/clients/authorization/Scopes.tsx Co-authored-by: Jon Koops <jonkoops@gmail.com> * Update src/clients/authorization/Scopes.tsx Co-authored-by: Jon Koops <jonkoops@gmail.com> * merge fix Co-authored-by: Jon Koops <jonkoops@gmail.com>
23 lines
717 B
TypeScript
23 lines
717 B
TypeScript
import type { LocationDescriptorObject } from "history";
|
|
import type { RouteDef } from "../../route-config";
|
|
import { generatePath } from "react-router-dom";
|
|
import { lazy } from "react";
|
|
|
|
export type ResourceDetailsParams = {
|
|
realm: string;
|
|
id: string;
|
|
resourceId?: string;
|
|
};
|
|
|
|
export const ResourceDetailsRoute: RouteDef = {
|
|
path: "/:realm/clients/:id/authorization/resource/:resourceId?",
|
|
component: lazy(() => import("../authorization/ResourceDetails")),
|
|
breadcrumb: (t) => t("clients:createResource"),
|
|
access: "manage-clients",
|
|
};
|
|
|
|
export const toResourceDetails = (
|
|
params: ResourceDetailsParams
|
|
): LocationDescriptorObject => ({
|
|
pathname: generatePath(ResourceDetailsRoute.path, params),
|
|
});
|