Skip to content

Commit

Permalink
Edited source of Version Number (CRASM-845) (#721)
Browse files Browse the repository at this point in the history
* Imported version number from .env to package.json

- Removed verison number from .env
- Version number is now based on "version" variable in frontend/package.json
- Imported frontend package.json in Footer.tsx

* Destructured version from package.json

* Fixed default exporting warning

- Imported the entire package json file to get the version number.
  • Loading branch information
hawkishpolicy authored Nov 12, 2024
1 parent 62c99ef commit c30afa4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,5 @@
"test": "react-scripts test",
"typecheck": "tsc --noEmit"
},
"version": "0.1.0"
"version": "0.3.11"
}
3 changes: 2 additions & 1 deletion frontend/src/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import { useAuthContext } from 'context';
import logo from '../../assets/cyhydashboard.svg';
import * as FooterStyles from './styleFooter';
import { Stack } from '@mui/system';
import packageJson from '../../../package.json';

export const CrossfeedFooter: React.FC = (props) => {
const { logout, user } = useAuthContext();
const FooterRoot = FooterStyles.FooterRoot;
const footerClasses = FooterStyles.footerClasses;
const versionNumber = process.env.REACT_APP_VERSION_NUMBER;
const versionNumber = packageJson.version;

return (
<FooterRoot>
Expand Down

0 comments on commit c30afa4

Please sign in to comment.