fix: apps version build issue (#11678)

This commit is contained in:
rajk93 2025-07-08 09:41:05 +05:30 committed by GitHub
parent b5aa0e6de1
commit df3b5caedf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 9 deletions

View File

@ -5,5 +5,6 @@ export * from './api/index.js';
export * from './endpoints/index.js';
export * from './extensions/index.js';
export * from './links/index.js';
export * from './packageInfo.js';
export * from './settings/index.js';
export * from './ui/index.js';

View File

@ -1,7 +1,6 @@
// Copyright 2017-2025 @polkadot/apps-config authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { packageInfo } from '../packageInfo.js';
import { identityNodes, identitySpec } from './identityIcons/index.js';
import { sanitize } from './util.js';
@ -12,7 +11,3 @@ export function getSystemIcon (systemName: string, specName: string): 'beachball
'substrate'
) as 'substrate';
}
export function getPackageVersion () {
return `apps v${packageInfo.version.replace('-x', '')}`;
}

View File

@ -5,14 +5,15 @@ import type { BareProps as Props } from '@polkadot/react-components/types';
import React from 'react';
import { getPackageVersion } from '@polkadot/apps-config';
import { packageInfo } from '@polkadot/apps-config';
import { styled } from '@polkadot/react-components';
import { useApi } from '@polkadot/react-hooks';
import { NodeName, NodeVersion } from '@polkadot/react-query';
const appsVersion = `apps v${packageInfo.version.replace('-x', '')}`;
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

@ -5,15 +5,16 @@ import type { BareProps as Props } from '@polkadot/react-components/types';
import React, { useRef } from 'react';
import { getPackageVersion } from '@polkadot/apps-config';
import { packageInfo } from '@polkadot/apps-config';
import { Input, Spinner, styled, Table } from '@polkadot/react-components';
import { useApi } from '@polkadot/react-hooks';
import { useTranslation } from '../translate.js';
const appsVersion = `apps v${packageInfo.version.replace('-x', '')}`;
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?][]>([