Skip to content

Commit

Permalink
feat: add package json number to app
Browse files Browse the repository at this point in the history
  • Loading branch information
danielstefanequilobe committed Mar 17, 2022
1 parent b8a2acb commit 2a4d613
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
REACT_APP_VERSION=$npm_package_version
BROWSER=none
13 changes: 13 additions & 0 deletions src/components/blocks/LeftNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
RegistryIcon,
Modal,
AddIconCircle,
Body,
} from '../../components';
import { Link } from 'react-router-dom';
import { useDispatch, useSelector } from 'react-redux';
Expand All @@ -23,6 +24,12 @@ const Container = styled('div')`
height: 100%;
`;

const StyledAppVersion = styled('div')`
position: absolute;
bottom: 12px;
left: 50px;
`;

const NavContainer = styled('div')`
width: 16rem;
min-width: 16rem;
Expand Down Expand Up @@ -212,6 +219,12 @@ const LeftNav = withTheme(({ children }) => {
}}
/>
)}
<StyledAppVersion>
<Body size="X-Small" color="white">
{process?.env?.REACT_APP_VERSION &&
`version: ${process.env.REACT_APP_VERSION}`}
</Body>
</StyledAppVersion>
</Container>
);
});
Expand Down

0 comments on commit 2a4d613

Please sign in to comment.