Disable automatically generated breadcrumbs (#894)

This commit is contained in:
Jon Koops 2021-07-22 16:48:00 +02:00 committed by GitHub
parent bed671d8be
commit 95289ac3e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View file

@ -25,6 +25,7 @@ export const PageBreadCrumbs = () => {
const crumbs = _.uniqBy(
useBreadcrumbs(routesWithCrumbs, {
disableDefaults: true,
excludePaths: ["/", `/${realm}`],
}),
elementText

View file

@ -41,7 +41,7 @@ import { UsersTabs } from "./user/UsersTabs";
export type RouteDef = {
path: string;
component: ComponentType;
breadcrumb: ((t: TFunction) => string | ComponentType<any>) | null;
breadcrumb?: (t: TFunction) => string | ComponentType<any>;
access: AccessType;
matchOptions?: MatchOptions;
};
@ -157,7 +157,6 @@ export const routes: RouteDef[] = [
{
path: "/:realm/identity-providers/:id/:tab?",
component: DetailSettings,
breadcrumb: null,
access: "manage-identity-providers",
},
{
@ -169,7 +168,6 @@ export const routes: RouteDef[] = [
{
path: "/:realm/user-federation/kerberos",
component: UserFederationSection,
breadcrumb: null,
access: "view-realm",
},
{
@ -187,7 +185,6 @@ export const routes: RouteDef[] = [
{
path: "/:realm/user-federation/ldap",
component: UserFederationSection,
breadcrumb: null,
access: "view-realm",
},
{
@ -223,7 +220,6 @@ export const routes: RouteDef[] = [
{
path: "/:realm/groups",
component: GroupsSection,
breadcrumb: null,
access: "query-groups",
matchOptions: {
exact: false,
@ -238,7 +234,6 @@ export const routes: RouteDef[] = [
{
path: "*",
component: PageNotFoundSection,
breadcrumb: null,
access: "anyone",
},
];