import { Fragment } from 'react'; import { t } from '@vegaprotocol/react-helpers'; import { Link, Lozenge } from '@vegaprotocol/ui-toolkit'; import { useEnvironment } from '@vegaprotocol/environment'; const getFeedbackLinks = (gitOriginUrl?: string) => [ { name: 'Github', url: gitOriginUrl, }, ].filter((link) => !!link.url); export const NetworkInfo = () => { const { VEGA_URL, GIT_COMMIT_HASH, GIT_ORIGIN_URL, GITHUB_FEEDBACK_URL, ETHEREUM_PROVIDER_URL, setNodeSwitcherOpen, } = useEnvironment(); const feedbackLinks = getFeedbackLinks(GITHUB_FEEDBACK_URL); return (
{t('Reading network data from')}{' '}
{t('Reading Ethereum data from')}{' '}
{t('Version/commit hash')}:{' '} {GIT_COMMIT_HASH}
)} {feedbackLinks.length > 0 && (
{t('Known issues and feedback on')}{' '}
{feedbackLinks.map(({ name, url }, index) => (