Small fixes to provide council page compatibility (#8791)
* small fixes to provide council page compatibility * Suggestions to get CI to lint * Update packages/page-democracy/src/Overview/ProposalCell.tsx Co-authored-by: Jaco <jacogr@gmail.com>
This commit is contained in:
parent
61907aa568
commit
357d969b60
@ -28,19 +28,26 @@ function Voters ({ balance, voters }: Props): React.ReactElement<Props> {
|
||||
|
||||
return (
|
||||
<>
|
||||
<td className='expand'>
|
||||
<ExpanderScroll
|
||||
className={balance ? '' : '--tmp'}
|
||||
renderChildren={renderVoters}
|
||||
summary={<FormatBalance value={balance} />}
|
||||
/>
|
||||
</td>
|
||||
<td className='number'>
|
||||
{voters
|
||||
? formatNumber(voters.length)
|
||||
: <span className='--tmp'>123</span>
|
||||
}
|
||||
</td>
|
||||
{voters
|
||||
? (
|
||||
<>
|
||||
<td className='expand'>
|
||||
<ExpanderScroll
|
||||
className={balance ? '' : '--tmp'}
|
||||
renderChildren={renderVoters}
|
||||
summary={<FormatBalance value={balance} />}
|
||||
/>
|
||||
</td>
|
||||
<td className='number'>
|
||||
{voters
|
||||
? formatNumber(voters.length)
|
||||
: <span className='--tmp'>123</span>
|
||||
}
|
||||
</td>
|
||||
</>
|
||||
)
|
||||
: <td colSpan={2} />
|
||||
}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ function ProposalCell ({ className = '', imageHash, proposal }: Props): React.Re
|
||||
const preimage = usePreimage(imageHash);
|
||||
|
||||
// while we still have this endpoint, democracy will use it
|
||||
const displayProposal = api.query.democracy.preimages
|
||||
const displayProposal = api.query.democracy?.preimages
|
||||
? proposal
|
||||
: preimage?.proposal;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user