Commit 4c79cd83 authored by POA's avatar POA

Partially fix lint:tsc errors

parent 1506dac0
...@@ -48,6 +48,7 @@ export type Transaction = ( ...@@ -48,6 +48,7 @@ export type Transaction = (
method: string | null; method: string | null;
tx_types: Array<TransactionType>; tx_types: Array<TransactionType>;
tx_tag: string | null; tx_tag: string | null;
actions?: Array<object>;
} }
export type TransactionsResponse = TransactionsResponseValidated | TransactionsResponsePending; export type TransactionsResponse = TransactionsResponseValidated | TransactionsResponsePending;
......
export type TokenTransferPagination = { export type TxAction = {
protocol: string; protocol: string;
type: string; type: string;
data: object; data: object;
......
...@@ -8,6 +8,8 @@ interface Props extends Omit<HTMLChakraProps<'div'>, 'title'> { ...@@ -8,6 +8,8 @@ interface Props extends Omit<HTMLChakraProps<'div'>, 'title'> {
title: React.ReactNode; title: React.ReactNode;
hint: string; hint: string;
children: React.ReactNode; children: React.ReactNode;
note?: string;
noteDisplay?: string;
} }
const DetailsInfoItem = ({ title, hint, note, noteDisplay, children, id, ...styles }: Props) => { const DetailsInfoItem = ({ title, hint, note, noteDisplay, children, id, ...styles }: Props) => {
......
...@@ -68,9 +68,9 @@ const TxDetailsAction = ({ protocol, type, data, isLast }: Props) => { ...@@ -68,9 +68,9 @@ const TxDetailsAction = ({ protocol, type, data, isLast }: Props) => {
<Text as="span">Mint of</Text> <Text as="span">Mint of</Text>
<Image src={ uniswapIconUrl } boxSize={ 5 } fallback=" " alt=""/> <Image src={ uniswapIconUrl } boxSize={ 5 } fallback=" " alt=""/>
<Link href={ tokenUrl } target="_blank" overflow="hidden" whiteSpace="nowrap"> <Link href={ tokenUrl } target="_blank" overflow="hidden" whiteSpace="nowrap">
<StringShorten title={ data.name } maxLength="12"/> <StringShorten title={ data.name } maxLength={ 12 }/>
{ space } { space }
(<StringShorten title={ data.symbol } maxLength="6"/>) (<StringShorten title={ data.symbol } maxLength={ 6 }/>)
</Link> </Link>
</Flex> </Flex>
<Flex columnGap={ 1 }> <Flex columnGap={ 1 }>
...@@ -80,7 +80,7 @@ const TxDetailsAction = ({ protocol, type, data, isLast }: Props) => { ...@@ -80,7 +80,7 @@ const TxDetailsAction = ({ protocol, type, data, isLast }: Props) => {
</Flex> </Flex>
<Flex columnGap={ 1 } rowGap={ 2 } marginLeft={ 3 } flexDirection="column"> <Flex columnGap={ 1 } rowGap={ 2 } marginLeft={ 3 } flexDirection="column">
{ {
data.ids.map((id) => { data.ids.map((id: string) => {
const url = link('token_instance_item', { hash: data.address, id }); const url = link('token_instance_item', { hash: data.address, id });
return ( return (
<Flex key={ id }> <Flex key={ id }>
......
...@@ -6,7 +6,11 @@ import DetailsInfoItem from 'ui/shared/DetailsInfoItem'; ...@@ -6,7 +6,11 @@ import DetailsInfoItem from 'ui/shared/DetailsInfoItem';
import TxDetailsAction from './TxDetailsAction'; import TxDetailsAction from './TxDetailsAction';
const TxDetailsActions = ({ actions }: array) => { interface Props {
actions: array;
}
const TxDetailsActions = ({ actions }: Props) => {
function onScrollbarLoad() { function onScrollbarLoad() {
$('.mCustomScrollbar').mCustomScrollbar({ callbacks: { $('.mCustomScrollbar').mCustomScrollbar({ callbacks: {
onOverflowY: () => { onOverflowY: () => {
...@@ -41,7 +45,7 @@ const TxDetailsActions = ({ actions }: array) => { ...@@ -41,7 +45,7 @@ const TxDetailsActions = ({ actions }: array) => {
w="100%" w="100%"
fontWeight={ 500 } fontWeight={ 500 }
> >
{ actions.map((action, index) => <TxDetailsAction key={ index } { ...action } isLast={ index === actions.length - 1 }/>) } { actions.map((action, index: number) => <TxDetailsAction key={ index } { ...action } isLast={ index === actions.length - 1 }/>) }
</Flex> </Flex>
</Box> </Box>
{ /* eslint-disable-next-line react/jsx-no-bind */ } { /* eslint-disable-next-line react/jsx-no-bind */ }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment