Add tip link to Polkassembly (#3355)

* add tip link

* header and media 1600
This commit is contained in:
Thibaut Sardan 2020-08-06 17:38:10 +02:00 committed by GitHub
parent 583b2b6778
commit 6c84c40d49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 3 deletions

View File

@ -17,6 +17,7 @@ export default {
council: 'motion',
proposal: 'proposal',
referendum: 'referendum',
tip: 'tip',
treasury: 'treasury'
},
url: 'https://polkassembly.io/'

View File

@ -4,7 +4,7 @@
import BN from 'bn.js';
export type LinkTypes = 'address' | 'block' | 'council' | 'extrinsic' | 'proposal' | 'referendum' | 'techcomm' | 'treasury';
export type LinkTypes = 'address' | 'block' | 'council' | 'extrinsic' | 'proposal' | 'referendum' | 'techcomm' | 'tip' | 'treasury';
export interface ExternalDef {
chains: Record<string, string>;

View File

@ -7,7 +7,7 @@ import { AccountId, Balance, BlockNumber, OpenTip, OpenTipTo225 } from '@polkado
import BN from 'bn.js';
import React, { useEffect, useState } from 'react';
import styled from 'styled-components';
import { AddressSmall, AddressMini, Expander, Icon, TxButton } from '@polkadot/react-components';
import { AddressSmall, AddressMini, Expander, Icon, LinkExternal, TxButton } from '@polkadot/react-components';
import { useAccounts } from '@polkadot/react-hooks';
import { BlockToTime, FormatBalance } from '@polkadot/react-query';
import { BN_ZERO, formatBalance, formatNumber } from '@polkadot/util';
@ -157,6 +157,13 @@ function Tip ({ bestNumber, className = '', hash, isMember, members, tip }: Prop
/>
)}
</td>
<td className='mini ui--media-1600'>
<LinkExternal
data={hash}
type='tip'
withShort
/>
</td>
</tr>
);
}

View File

@ -52,7 +52,8 @@ function Tips ({ className = '', hashes, isMember, members }: Props): React.Reac
[t('reason'), 'start'],
[],
[],
[undefined, 'badge']
[undefined, 'badge'],
[undefined, 'mini ui--media-1600']
].filter((v) => v), [t]);
return (