From b4d47e0395612c1cf47e61df916385a5867f1bca Mon Sep 17 00:00:00 2001 From: Kartik Date: Mon, 31 Oct 2022 13:21:53 -0700 Subject: [PATCH] Trims package.json version in the selector drodown (#97) Signed-off-by: Kartik (cherry picked from commit 2a0f4a444ef8406e2da936a8f469de99c67858ad) --- src-docs/src/components/guide_page/guide_page_header.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src-docs/src/components/guide_page/guide_page_header.tsx b/src-docs/src/components/guide_page/guide_page_header.tsx index dcb3d9a763..62f48d1f47 100644 --- a/src-docs/src/components/guide_page/guide_page_header.tsx +++ b/src-docs/src/components/guide_page/guide_page_header.tsx @@ -67,7 +67,8 @@ export const GuidePageHeader: React.FunctionComponent = ({ } function renderVersion() { - return ; + const trimVersion = pkg.version.replace(/^(\d+\.\d+)\..*/, '$1'); + return ; } function renderGithub() {