chore(trading): dont show upgrade banner unless APP_VERSION is set (#3886)

This commit is contained in:
Matthew Russell 2023-05-22 14:10:06 -07:00 committed by GitHub
parent e9cb2ad217
commit 7b9aae700d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View File

@ -12,7 +12,4 @@ NX_VEGA_WALLET_URL=http://localhost:1789
NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet
NX_VEGA_REPO_URL=https://github.com/vegaprotocol/vega/releases
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/main/announcements.json
NX_WALLETCONNECT_PROJECT_ID=fe8091dc35738863e509fc4947525c72
# TAG name of the current app version - TODO: bump to the latest upon release
NX_APP_VERSION=v0.20.7-core-0.71.4
NX_WALLETCONNECT_PROJECT_ID=fe8091dc35738863e509fc4947525c72

View File

@ -13,3 +13,5 @@ NX_VEGA_REPO_URL=https://github.com/vegaprotocol/vega/releases
NX_ANNOUNCEMENTS_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/announcements/mainnet/announcements.json
NX_VEGA_INCIDENT_URL=https://blog.vega.xyz/tagged/vega-incident-reports
NX_VEGA_CONSOLE_URL=https://vega.trading
# TAG name of the current app version - TODO: bump to the latest upon release
NX_APP_VERSION=v0.20.8-core-0.71.4

View File

@ -36,6 +36,8 @@ export const UpgradeBanner = ({ showVersionChange }: UpgradeBannerProps) => {
return valid && valid.length > 0 ? valid[0] : undefined;
}, [VEGA_ENV, data]);
if (!APP_VERSION) return null;
if (!visible || !latest || latest.tagName === APP_VERSION) return null;
const versionChange = (
@ -65,7 +67,7 @@ export const UpgradeBanner = ({ showVersionChange }: UpgradeBannerProps) => {
{t('Bookmark')}{' '}
<ExternalLink href={CANONICAL_URL}>{t('vega.trading')}</ExternalLink>
<CopyWithTooltip text={CANONICAL_URL}>
<button title={t('Copy %s', CANONICAL_URL)} className="text-white">
<button title={t('Copy %s', CANONICAL_URL)}>
<span className="sr-only">{t('Copy %s', CANONICAL_URL)}</span>
<VegaIcon size={14} name={VegaIconNames.COPY} />
</button>