diff --git a/.env b/.env new file mode 100644 index 00000000..c213dd39 --- /dev/null +++ b/.env @@ -0,0 +1 @@ +REACT_APP_BEE_DASHBOARD_VERSION=${npm_package_version} diff --git a/src/constants.ts b/src/constants.ts index 9a69931c..39dddaf3 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -9,6 +9,7 @@ export const GITHUB_REPO_URL = 'https://api.github.com/repos/ethersphere/bee' export const BEE_DESKTOP_LATEST_RELEASE_PAGE = 'https://github.com/ethersphere/bee-desktop/releases/latest' export const BEE_DESKTOP_LATEST_RELEASE_PAGE_API = 'https://api.github.com/repos/ethersphere/bee-desktop/releases/latest' +export const BEE_DASHBOARD_VERSION = process.env.REACT_APP_BEE_DASHBOARD_VERSION || 'unknown' export const DEFAULT_BEE_API_HOST = 'http://localhost:1633' export const DEFAULT_BEE_DEBUG_API_HOST = 'http://localhost:1635' export const DEFAULT_RPC_URL = 'https://xdai.fairdatasociety.org' diff --git a/src/pages/info/index.tsx b/src/pages/info/index.tsx index 9c9d5eb4..6a95b01b 100644 --- a/src/pages/info/index.tsx +++ b/src/pages/info/index.tsx @@ -2,7 +2,7 @@ import { Button } from '@material-ui/core' import { ReactElement, useContext } from 'react' import ExpandableListItem from '../../components/ExpandableListItem' import Map from '../../components/Map' -import { BEE_DESKTOP_LATEST_RELEASE_PAGE } from '../../constants' +import { BEE_DESKTOP_LATEST_RELEASE_PAGE, BEE_DASHBOARD_VERSION } from '../../constants' import { useBeeDesktop, useNewBeeDesktopVersion } from '../../hooks/apiHooks' import { Context as BeeContext } from '../../providers/Bee' import { Context as SettingsContext } from '../../providers/Settings' @@ -65,6 +65,7 @@ export default function Status(): ReactElement { } /> )} +