Reorder treasury columns (#8705)

This commit is contained in:
Jaco 2023-01-06 10:38:45 +02:00 committed by GitHub
parent 48e37cd4e5
commit 16bd594cc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View File

@ -5,7 +5,7 @@ import type { DeriveTreasuryProposal } from '@polkadot/api-derive/types';
import React, { useMemo } from 'react';
import { AddressSmall, Columar, LinkExternal, Table } from '@polkadot/react-components';
import { AddressMini, AddressSmall, Columar, LinkExternal, Table } from '@polkadot/react-components';
import { useApi, useToggle } from '@polkadot/react-hooks';
import { FormatBalance } from '@polkadot/react-query';
import { isFunction } from '@polkadot/util';
@ -40,16 +40,17 @@ function ProposalDisplay ({ className = '', isMember, members, proposal: { counc
<tr className={className}>
<Table.Column.Id value={id} />
<td className='address all'>
<AddressSmall value={proposal.proposer} />
</td>
<td className='address'>
<AddressSmall value={proposal.beneficiary} />
</td>
<td className='number'>
<FormatBalance value={proposal.value} />
</td>
<td className='number'>
<FormatBalance value={proposal.bond} />
<td className='address'>
<AddressMini
balance={proposal.bond}
value={proposal.proposer}
withBalance
/>
</td>
<td className={hasProposals ? 'middle' : 'button'}>
{hasCouncil
@ -74,7 +75,7 @@ function ProposalDisplay ({ className = '', isMember, members, proposal: { counc
<td />
<td
className='columar'
colSpan={5}
colSpan={4}
>
<Columar is100>
<Columar.Column>

View File

@ -23,9 +23,8 @@ function ProposalsBase ({ className = '', isApprovals, isMember, members, propos
const header = useMemo<([React.ReactNode?, string?, number?] | false)[]>(() => [
[isApprovals ? t<string>('Approved') : t<string>('Proposals'), 'start', 2],
[t('beneficiary'), 'address'],
[t('payment')],
[t('bond')],
[],
[t('proposer'), 'address'],
[],
[]
], [isApprovals, t]);