Make "Personal Info" the default index route (#20887)
This commit is contained in:
parent
9425432f2c
commit
79ff5ded63
4 changed files with 5 additions and 19 deletions
|
@ -158,6 +158,5 @@
|
|||
"updateSuccess": "Resource successfully updated.",
|
||||
"user": "User",
|
||||
"username": "Username",
|
||||
"usernamePlaceholder": "Username or email",
|
||||
"welcomeMessage": "Welcome to Keycloak Account Management."
|
||||
"usernamePlaceholder": "Username or email"
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ type MenuItem = RootMenuItem | MenuItemWithChildren;
|
|||
const menuItems: MenuItem[] = [
|
||||
{
|
||||
label: "personalInfo",
|
||||
path: "personal-info",
|
||||
path: "/",
|
||||
},
|
||||
{
|
||||
label: "accountSecurity",
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
import { PageSection } from "@patternfly/react-core";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export const RootIndex = () => {
|
||||
const { t } = useTranslation();
|
||||
return <PageSection>{t("welcomeMessage")}</PageSection>;
|
||||
};
|
|
@ -3,7 +3,6 @@ import type { IndexRouteObject, RouteObject } from "react-router-dom";
|
|||
|
||||
import { ErrorPage } from "./root/ErrorPage";
|
||||
import { Root } from "./root/Root";
|
||||
import { RootIndex } from "./root/RootIndex";
|
||||
|
||||
const DeviceActivity = lazy(() => import("./account-security/DeviceActivity"));
|
||||
const LinkedAccounts = lazy(() => import("./account-security/LinkedAccounts"));
|
||||
|
@ -38,19 +37,14 @@ export const GroupsRoute: RouteObject = {
|
|||
element: <Groups />,
|
||||
};
|
||||
|
||||
export const PersonalInfoRoute: RouteObject = {
|
||||
path: "personal-info",
|
||||
element: <PersonalInfo />,
|
||||
};
|
||||
|
||||
export const ResourcesRoute: RouteObject = {
|
||||
path: "resources",
|
||||
element: <Resources />,
|
||||
};
|
||||
|
||||
export const RootIndexRoute: IndexRouteObject = {
|
||||
export const PersonalInfoRoute: IndexRouteObject = {
|
||||
index: true,
|
||||
element: <RootIndex />,
|
||||
element: <PersonalInfo />,
|
||||
};
|
||||
|
||||
export const RootRoute: RouteObject = {
|
||||
|
@ -58,7 +52,7 @@ export const RootRoute: RouteObject = {
|
|||
element: <Root />,
|
||||
errorElement: <ErrorPage />,
|
||||
children: [
|
||||
RootIndexRoute,
|
||||
PersonalInfoRoute,
|
||||
DeviceActivityRoute,
|
||||
LinkedAccountsRoute,
|
||||
SigningInRoute,
|
||||
|
|
Loading…
Reference in a new issue