Make "Personal Info" the default index route (#20887)

This commit is contained in:
Jon Koops 2023-06-12 14:10:26 +02:00 committed by GitHub
parent 9425432f2c
commit 79ff5ded63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 19 deletions

View file

@ -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"
}

View file

@ -35,7 +35,7 @@ type MenuItem = RootMenuItem | MenuItemWithChildren;
const menuItems: MenuItem[] = [
{
label: "personalInfo",
path: "personal-info",
path: "/",
},
{
label: "accountSecurity",

View file

@ -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>;
};

View file

@ -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,