Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions frontend/packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"react-scripts": "4.0.3",
"sass": "^1.49.8",
"string-strip-html": "8.3.0",
"yup": "^0.32.11"
"yup": "^0.32.11",
"react-git-info": "^2.0.1"
},
"scripts": {
"start": "craco start",
Expand Down Expand Up @@ -109,4 +110,4 @@
"resolutions": {
"react-error-overlay": "6.0.9"
}
}
}
Binary file added frontend/packages/client/public/Green-Circle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions frontend/packages/client/src/components/Version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import GitInfo from 'react-git-info/macro';
import { HomeFooter } from 'components';

const styles = {
centerTextStyle: {
position: 'absolute',
width: '100%',
top: '45%',
left: '50%',
transform: 'translate(-50%, -50%)',
textAlign: 'center',
color: 'white',
padding: '10px',
},
};

export default function Version() {
const gitInfo = GitInfo();

return (
<div className="section is-flex is-flex-direction-column full-height">
<div className="is-flex-grow-1 mx-auto is-flex is-align-items-center">
<div class="is-relative ">
<img src="Green-Circle.png" alt="Green Circle" />
<div style={styles.centerTextStyle}>
<div className="is-relative">
<p className="is-size-3 mb-5 has-text-black">
<b>Version:</b>
</p>
<p className="is-size-5">
<b>SHA Commit Id:</b> {gitInfo.commit.shortHash}
</p>
<br />
<p className="is-size-5">
<b>Branch/Environment:</b> {gitInfo.branch}
</p>
</div>
</div>
</div>
</div>

<HomeFooter />
</div>
);
}
4 changes: 4 additions & 0 deletions frontend/packages/client/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const Community = lazy(() => import('./Community'));
const CommunityEditor = lazy(() => import('./CommunityEditor'));
const CommunityCreate = lazy(() => import('./CommunityCreate'));
const BrowseCommunities = lazy(() => import('./BrowseCommunities'));
const Version = lazy(() => import('components/Version'));

export default function AppPages() {
return (
Expand All @@ -33,6 +34,9 @@ export default function AppPages() {
<Route exact path="/browse-communities">
<BrowseCommunities />
</Route>
<Route exact path="/version">
<Version />
</Route>
<Route exact path="/community/create">
<CommunityCreate />
</Route>
Expand Down