fix: move appsVersion initialization inside component (#11600)

This commit is contained in:
Arjun Porwal 2025-06-04 20:17:35 +05:30 committed by GitHub
parent 972f54c318
commit ac007cfb3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View File

@ -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`}>

View File

@ -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?][]>([