Skip to content

Commit

Permalink
Allow searching in Dappstore with :version
Browse files Browse the repository at this point in the history
  • Loading branch information
dappnodedev committed Sep 4, 2024
1 parent 2d988dd commit 78215d2
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,17 @@ export const InstallerDnp: React.FC = () => {
}
]
});
} else navigate(encodeURIComponent(id));
} else {
// Check if version has been defined like dnpName:version
const [dnpName, version] = id.split(":");

const encodedDnpName = encodeURIComponent(dnpName);
const encodedVersion = version ? encodeURIComponent(version) : null;

Check failure on line 91 in packages/admin-ui/src/pages/installer/components/dappnodeDappstore/InstallerDnp.tsx

View workflow job for this annotation

GitHub Actions / Unit tests

Delete `······`
const pkgPath = encodedVersion ? `${encodedDnpName}/${encodedVersion}` : encodedDnpName;

Check failure on line 93 in packages/admin-ui/src/pages/installer/components/dappnodeDappstore/InstallerDnp.tsx

View workflow job for this annotation

GitHub Actions / Unit tests

Delete `······`
navigate(pkgPath);

Check failure on line 94 in packages/admin-ui/src/pages/installer/components/dappnodeDappstore/InstallerDnp.tsx

View workflow job for this annotation

GitHub Actions / Unit tests

Delete `·`
}
}

function onCategoryChange(category: string) {
Expand Down

0 comments on commit 78215d2

Please sign in to comment.