diff --git a/extension/extend-account-console-node/src/PageNav.tsx b/extension/extend-account-console-node/src/PageNav.tsx index bb938ffc6..5ee21d47f 100644 --- a/extension/extend-account-console-node/src/PageNav.tsx +++ b/extension/extend-account-console-node/src/PageNav.tsx @@ -9,19 +9,24 @@ import { import { PropsWithChildren, MouseEvent as ReactMouseEvent, useState } from "react"; import { useTranslation } from "react-i18next"; import { useHref, useLinkClickHandler } from "react-router-dom"; +import { environment } from "./environment"; import { routes } from "./routes"; type NavLinkProps = NavItemProps & { path?: string; }; +function getFullUrl(path: string) { + return `${new URL(environment.baseUrl).pathname}${path}`; +} + const NavLink = ({ path, isActive, children, onClick, }: PropsWithChildren) => { - const menuItemPath = path!; + const menuItemPath = getFullUrl(path!) + location.search; const href = useHref(menuItemPath); const handleClick = useLinkClickHandler(menuItemPath);