diff --git a/packages/admin-ui/src/pages/installer/components/InstallDnpContainer.tsx b/packages/admin-ui/src/pages/installer/components/InstallDnpContainer.tsx index d12a2c9a5..416965877 100644 --- a/packages/admin-ui/src/pages/installer/components/InstallDnpContainer.tsx +++ b/packages/admin-ui/src/pages/installer/components/InstallDnpContainer.tsx @@ -1,7 +1,7 @@ import React from "react"; import { useApi } from "api"; import { useSelector } from "react-redux"; -import { useParams } from "react-router-dom"; +import { useParams, useSearchParams } from "react-router-dom"; import { title } from "../data"; // This module import InstallDnpView from "./InstallDnpView"; @@ -13,7 +13,9 @@ import ErrorView from "components/ErrorView"; import { getProgressLogsByDnp } from "services/isInstallingLogs/selectors"; const InstallDnpContainer: React.FC = () => { - const { id, version } = useParams<{ id: string; version: string }>(); + const { id } = useParams<{ id: string }>(); + const [searchParams] = useSearchParams(); + const version = searchParams.get("version") || undefined; const progressLogsByDnp = useSelector(getProgressLogsByDnp); // TODO: return a beautiful error page diff --git a/packages/admin-ui/src/pages/installer/components/InstallerRoot.tsx b/packages/admin-ui/src/pages/installer/components/InstallerRoot.tsx index cf28415ee..2d56d879f 100644 --- a/packages/admin-ui/src/pages/installer/components/InstallerRoot.tsx +++ b/packages/admin-ui/src/pages/installer/components/InstallerRoot.tsx @@ -105,7 +105,7 @@ const InstallerRoot: React.FC = () => { element={ } /> - } /> + } /> } /> diff --git a/packages/admin-ui/src/pages/installer/components/dappnodeDappstore/InstallerDnp.tsx b/packages/admin-ui/src/pages/installer/components/dappnodeDappstore/InstallerDnp.tsx index 8472b435e..bf93a4c43 100644 --- a/packages/admin-ui/src/pages/installer/components/dappnodeDappstore/InstallerDnp.tsx +++ b/packages/admin-ui/src/pages/installer/components/dappnodeDappstore/InstallerDnp.tsx @@ -89,7 +89,7 @@ export const InstallerDnp: React.FC = () => { const encodedDnpName = encodeURIComponent(dnpName); const encodedVersion = version ? encodeURIComponent(version) : null; - const pkgPath = encodedVersion ? `${encodedDnpName}/${encodedVersion}` : encodedDnpName; + const pkgPath = encodedVersion ? `${encodedDnpName}?version=${encodedVersion}` : encodedDnpName; navigate(pkgPath); }