Skip to content

Commit

Permalink
fix: ensure that admin version is fully shown (#465)
Browse files Browse the repository at this point in the history
  • Loading branch information
anrusina committed May 18, 2022
1 parent e84a3c0 commit 0853680
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/zapp/console/src/components/hooks/useVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ function useVersion() {
export function useAdminVersion() {
const version = useVersion();

const controlPlaneVersion = version?.value?.controlPlaneVersion;
const adminVersion = controlPlaneVersion
? controlPlaneVersion.Version?.slice(1, controlPlaneVersion.Version?.indexOf('-'))
: null;
const cpVersion = version?.value?.controlPlaneVersion;

// Remove letter "v" from version string, if it's in the beginning
const adminVersion = cpVersion?.Version?.replace(/^v/, '') ?? null;

return { adminVersion };
}

0 comments on commit 0853680

Please sign in to comment.