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

improve loading

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