Display trackId (#8405)

This commit is contained in:
Jaco 2022-11-23 19:50:25 +02:00 committed by GitHub
parent 940f60b38a
commit 272bd9bc1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,6 +8,7 @@ import React, { useMemo } from 'react';
import AddPreimage from '@polkadot/app-preimages/Preimages/Add';
import { Button, Table } from '@polkadot/react-components';
import { useAccounts } from '@polkadot/react-hooks';
import { formatNumber } from '@polkadot/util';
import { useTranslation } from '../translate';
import useReferenda from '../useReferenda';
@ -48,11 +49,11 @@ function Referenda ({ className, members, palletReferenda, palletVote }: Props):
tracks={tracks}
/>
</Button.Group>
{grouped.map(({ referenda, trackName }: ReferendaGroup) => (
{grouped.map(({ referenda, trackId, trackName }: ReferendaGroup) => (
<Table
empty={referenda && t<string>('No active referenda')}
header={[
[trackName || t('referenda'), 'start', 2],
[trackName ? `${formatNumber(trackId)} / ${trackName}` : t('referenda'), 'start', 2],
[undefined, undefined, 6]
]}
key={