diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.test.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.test.tsx index 4063bc6371cbd..3477335321a2c 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.test.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.test.tsx @@ -109,9 +109,7 @@ describe('when on integration detail', () => { pagePathGetters.integration_details_custom({ pkgkey: 'nginx-0.3.7' })[1] ); }); - expect(testRenderer.history.location.pathname).toEqual( - '/app/integrations/detail/nginx-0.3.7/overview' - ); + expect(testRenderer.history.location.pathname).toEqual('/detail/nginx-0.3.7/overview'); }); }); diff --git a/x-pack/plugins/fleet/public/hooks/use_link.ts b/x-pack/plugins/fleet/public/hooks/use_link.ts index df6f45af31d56..6917e0f5c3b8e 100644 --- a/x-pack/plugins/fleet/public/hooks/use_link.ts +++ b/x-pack/plugins/fleet/public/hooks/use_link.ts @@ -21,9 +21,7 @@ export const useLink = () => { const core = useStartServices(); return { getPath: (page: StaticPage | DynamicPage, values: DynamicPagePathValues = {}): string => { - const [basePath, path] = getSeparatePaths(page, values); - - return `${basePath}${path}`; + return getSeparatePaths(page, values)[1]; }, getAssetsPath: (path: string) => core.http.basePath.prepend(`/plugins/${PLUGIN_ID}/assets/${path}`),