From feddb660afc7f711f189596c3d809eec8c2e7487 Mon Sep 17 00:00:00 2001 From: kaustubh-rh <88367583+kaustubh-rh@users.noreply.github.com> Date: Mon, 12 Aug 2024 11:37:57 +0530 Subject: [PATCH] Fix for #31704 (#31995) Signed-off-by: kaustubh B --- .../src/components/routable-tabs/RoutableTabs.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/apps/admin-ui/src/components/routable-tabs/RoutableTabs.tsx b/js/apps/admin-ui/src/components/routable-tabs/RoutableTabs.tsx index 1a2d7f42c13..9735936427e 100644 --- a/js/apps/admin-ui/src/components/routable-tabs/RoutableTabs.tsx +++ b/js/apps/admin-ui/src/components/routable-tabs/RoutableTabs.tsx @@ -24,6 +24,7 @@ import { useServerInfo } from "../../context/server-info/ServerInfoProvider"; import { PageHandler } from "../../page/PageHandler"; import { TAB_PROVIDER } from "../../page/PageList"; import useIsFeatureEnabled, { Feature } from "../../utils/useIsFeatureEnabled"; +import { useTranslation } from "react-i18next"; // TODO: Remove the custom 'children' props and type once the following issue has been resolved: // https://github.com/patternfly/patternfly-react/issues/6766 @@ -49,6 +50,7 @@ export const RoutableTabs = ({ const { componentTypes } = useServerInfo(); const tabs = componentTypes?.[TAB_PROVIDER] || []; const isFeatureEnabled = useIsFeatureEnabled(); + const { t } = useTranslation(); const matchedTabs = tabs .filter((tab) => matchPath({ path: tab.metadata.path }, pathname)) @@ -95,9 +97,9 @@ export const RoutableTabs = ({ > {children as any} {isFeatureEnabled(Feature.DeclarativeUI) && - matchedTabs.map((t) => ( - - + matchedTabs.map((tab) => ( + + ))}