Skip to content

Commit

Permalink
Trims package.json version in the selector drodown (#97)
Browse files Browse the repository at this point in the history
Signed-off-by: Kartik <[email protected]>
(cherry picked from commit 2a0f4a4)
  • Loading branch information
kaddy645 authored and github-actions[bot] committed Jan 5, 2023
1 parent ec8c0ba commit b4d47e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src-docs/src/components/guide_page/guide_page_header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ export const GuidePageHeader: React.FunctionComponent<GuidePageHeaderProps> = ({
}

function renderVersion() {
return <version-selector selected={pkg.version} />;
const trimVersion = pkg.version.replace(/^(\d+\.\d+)\..*/, '$1');
return <version-selector selected={trimVersion} />;
}

function renderGithub() {
Expand Down

0 comments on commit b4d47e0

Please sign in to comment.