From daf5fc8aba46260b83fa872e3f661ca7ed0039a8 Mon Sep 17 00:00:00 2001 From: "a.bouhuolia" Date: Mon, 3 Jan 2022 13:49:55 +0200 Subject: [PATCH] feat: add version numebr on sidebar footer. --- package.json | 2 +- src/components/Sidebar/Sidebar.js | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0ef5d4084..96fb00cde 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bigcapital-client", - "version": "1.2.0", + "version": "1.5.2", "private": true, "dependencies": { "@babel/core": "7.8.4", diff --git a/src/components/Sidebar/Sidebar.js b/src/components/Sidebar/Sidebar.js index 676425b18..dee5b7d12 100644 --- a/src/components/Sidebar/Sidebar.js +++ b/src/components/Sidebar/Sidebar.js @@ -1,4 +1,5 @@ import React from 'react'; + import SidebarContainer from 'components/Sidebar/SidebarContainer'; import SidebarHead from 'components/Sidebar/SidebarHead'; import SidebarMenu from 'components/Sidebar/SidebarMenu'; @@ -17,7 +18,20 @@ export default function Sidebar({ dashboardContentRef }) { - + ); } + +/** + * Sidebar footer version. + * @returns {React.JSX} + */ +function SidebarFooterVersion() { + const { REACT_APP_VERSION: VERSION } = process.env; + + if (!VERSION) { + return null; + } + return ; +}