diff --git a/src/Routing.tsx b/src/Routing.tsx
index 9ceadb129..7fa536c84 100644
--- a/src/Routing.tsx
+++ b/src/Routing.tsx
@@ -284,13 +284,16 @@ const Routing = () => {
const routes = getRoutes({ enableServiceAccounts, isITLess, isWorkspacesFlag });
const renderedRoutes = useMemo(() => renderRoutes(routes as never), [routes]);
+
+ const { getBundle, getApp } = useChrome();
+ const defaultBasename = `/${getBundle()}/${getApp()}`;
return (
}>
{renderedRoutes}
{/* Catch all unmatched routes */}
- } />
+ } />
);
diff --git a/src/presentational-components/shared/AppLink.tsx b/src/presentational-components/shared/AppLink.tsx
index 2f54cec78..f335667da 100644
--- a/src/presentational-components/shared/AppLink.tsx
+++ b/src/presentational-components/shared/AppLink.tsx
@@ -1,3 +1,4 @@
+import useChrome from '@redhat-cloud-services/frontend-components/useChrome';
import React, { LegacyRef } from 'react';
import { Link, LinkProps, To } from 'react-router-dom';
@@ -17,11 +18,15 @@ export const mergeToBasename = (to: To, basename = '/iam/user-access') => {
};
};
-const AppLink: React.FC = React.forwardRef((props: AppLinkProps, ref: LegacyRef) => (
-
-
-
-));
+const AppLink: React.FC = React.forwardRef((props: AppLinkProps, ref: LegacyRef) => {
+ const { getBundle, getApp } = useChrome();
+ const defaultBasename = `/${getBundle()}/${getApp()}`;
+ return (
+
+
+
+ );
+});
AppLink.displayName = 'AppLink';
diff --git a/src/test/__mocks__/@redhat-cloud-services/frontend-components/useChrome/index.js b/src/test/__mocks__/@redhat-cloud-services/frontend-components/useChrome/index.js
index 669441c3c..2d1a42495 100644
--- a/src/test/__mocks__/@redhat-cloud-services/frontend-components/useChrome/index.js
+++ b/src/test/__mocks__/@redhat-cloud-services/frontend-components/useChrome/index.js
@@ -5,6 +5,8 @@ const useChrome = () => ({
isProd: () => true,
getEnvironment: () => undefined,
auth: { getUser: () => undefined },
+ getBundle: () => 'iam',
+ getApp: () => 'user-access',
});
module.exports = useChrome;