fix: move appsVersion initialization inside component (#11600)
This commit is contained in:
parent
972f54c318
commit
ac007cfb3e
@ -10,10 +10,9 @@ import { styled } from '@polkadot/react-components';
|
||||
import { useApi } from '@polkadot/react-hooks';
|
||||
import { NodeName, NodeVersion } from '@polkadot/react-query';
|
||||
|
||||
const appsVersion = getPackageVersion();
|
||||
|
||||
function NodeInfo ({ className = '' }: Props): React.ReactElement<Props> {
|
||||
const { api, isApiReady } = useApi();
|
||||
const appsVersion = getPackageVersion();
|
||||
|
||||
return (
|
||||
<StyledDiv className={`${className} media--1400 highlight--color-contrast ui--NodeInfo`}>
|
||||
|
||||
@ -11,10 +11,9 @@ import { useApi } from '@polkadot/react-hooks';
|
||||
|
||||
import { useTranslation } from '../translate.js';
|
||||
|
||||
const appsVersion = getPackageVersion();
|
||||
|
||||
function SystemVersion ({ className }: Props): React.ReactElement<Props> {
|
||||
const { t } = useTranslation();
|
||||
const appsVersion = getPackageVersion();
|
||||
const { api, isApiReady, systemName, systemVersion } = useApi();
|
||||
|
||||
const headerRef = useRef<[React.ReactNode?, string?, number?][]>([
|
||||
|
||||
Loading…
Reference in New Issue
Block a user