Commit 291210de authored by Max Alekseenko's avatar Max Alekseenko

improve loading

parent c5a4eef0
...@@ -72,7 +72,7 @@ const TxSubHeading = ({ hash, hasTag, txQuery }: Props) => { ...@@ -72,7 +72,7 @@ const TxSubHeading = ({ hash, hasTag, txQuery }: Props) => {
return ( return (
<TxInterpretation <TxInterpretation
summary={ novesSummary } summary={ novesSummary }
isLoading={ novesInterpretationQuery.isPlaceholderData } isLoading={ novesInterpretationQuery.isPlaceholderData || txQuery.isPlaceholderData }
ensDomainNames={ ensDomainNames } ensDomainNames={ ensDomainNames }
fontSize="lg" fontSize="lg"
mr={{ base: 0, lg: 6 }} mr={{ base: 0, lg: 6 }}
...@@ -83,7 +83,7 @@ const TxSubHeading = ({ hash, hasTag, txQuery }: Props) => { ...@@ -83,7 +83,7 @@ const TxSubHeading = ({ hash, hasTag, txQuery }: Props) => {
<Flex mr={{ base: 0, lg: 6 }} flexWrap="wrap" alignItems="center"> <Flex mr={{ base: 0, lg: 6 }} flexWrap="wrap" alignItems="center">
<TxInterpretation <TxInterpretation
summary={ txInterpretationQuery.data?.data.summaries[0] } summary={ txInterpretationQuery.data?.data.summaries[0] }
isLoading={ txInterpretationQuery.isPlaceholderData } isLoading={ txInterpretationQuery.isPlaceholderData || txQuery.isPlaceholderData }
ensDomainNames={ ensDomainNames } ensDomainNames={ ensDomainNames }
fontSize="lg" fontSize="lg"
mr={ hasViewAllInterpretationsLink ? 3 : 0 } mr={ hasViewAllInterpretationsLink ? 3 : 0 }
...@@ -122,6 +122,11 @@ const TxSubHeading = ({ hash, hasTag, txQuery }: Props) => { ...@@ -122,6 +122,11 @@ const TxSubHeading = ({ hash, hasTag, txQuery }: Props) => {
} }
})(); })();
const isLoading =
txQuery.isPlaceholderData ||
(hasNovesInterpretation && novesInterpretationQuery.isPlaceholderData) ||
(hasInternalInterpretation && txInterpretationQuery.isPlaceholderData);
return ( return (
<Box display={{ base: 'block', lg: 'flex' }} alignItems="center" w="100%"> <Box display={{ base: 'block', lg: 'flex' }} alignItems="center" w="100%">
{ content } { content }
...@@ -132,7 +137,7 @@ const TxSubHeading = ({ hash, hasTag, txQuery }: Props) => { ...@@ -132,7 +137,7 @@ const TxSubHeading = ({ hash, hasTag, txQuery }: Props) => {
gap={ 3 } gap={ 3 }
mt={{ base: 3, lg: 0 }} mt={{ base: 3, lg: 0 }}
> >
{ !hasTag && <AccountActionsMenu/> } { !hasTag && <AccountActionsMenu isLoading={ isLoading }/> }
{ (appActionData && hasAnyInterpretation) && ( { (appActionData && hasAnyInterpretation) && (
<AppActionButton data={ appActionData } txHash={ hash } source="Txn"/> <AppActionButton data={ appActionData } txHash={ hash } source="Txn"/>
) } ) }
......
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