Move society payout button (#8654)

* Move society payout button

* Move absolute alignment
This commit is contained in:
Jaco 2022-12-29 11:36:06 +02:00 committed by GitHub
parent 1f57032940
commit b61a022e29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 9 deletions

View File

@ -56,7 +56,7 @@ function Member ({ bestNumber, className = '', value: { accountId, isCandidateVo
[bestNumber, payouts]
);
const isMember = useMemo(
const isOwner = useMemo(
() => allAccounts.some((a) => a === key),
[allAccounts, key]
);
@ -130,22 +130,21 @@ function Member ({ bestNumber, className = '', value: { accountId, isCandidateVo
summary={t<string>('Payouts ({{count}})', { replace: { count: formatNumber(payouts.length) } })}
/>
)}
</td>
<td className='together'>{votedOn}</td>
<td className='number'>{formatNumber(strikes)}</td>
<td className='button start'>
<DesignKusama accountId={accountId} />
{availablePayout && (
{isOwner && availablePayout && (
<TxButton
accountId={accountId}
icon='ellipsis-h'
isDisabled={!isMember}
label='Payout'
params={[]}
tx={api.tx.society.payout}
/>
)}
</td>
<td className='together'>{votedOn}</td>
<td className='number'>{formatNumber(strikes)}</td>
<td className='button start'>
<DesignKusama accountId={accountId} />
</td>
</tr>
);
}

View File

@ -291,7 +291,7 @@ export default React.memo(styled(Table)`
.absolute {
position: absolute;
right: 0;
top: 0.25rem;
top: 0.75rem;
white-space: nowrap;
}
}