Pass version to UI through AppConfig, instead of login payload.master

This makes the version info updated with a browser refresh (no need to logout and login again)
This commit is contained in:
Deluan
2020-04-08 11:00:30 -04:00
parent db246900a6
commit 089a92157f
6 changed files with 35 additions and 14 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ import {
} from 'react-admin'
import { makeStyles } from '@material-ui/core'
import InfoIcon from '@material-ui/icons/Info'
import config from '../config'
const useStyles = makeStyles((theme) => ({
menuItem: {
@@ -22,7 +23,7 @@ const VersionMenu = forwardRef((props, ref) => {
ref={ref}
to="#"
primaryText={translate('menu.version', {
version: localStorage.getItem('version')
version: config.version
})}
leftIcon={<InfoIcon />}
className={classes.menuItem}