Add loading indicator
This commit is contained in:
parent
d9155bff11
commit
b9a9495c61
|
@ -36,6 +36,8 @@ const Trace: React.FC<TraceProps> = ({ txData, resolvedAddresses }) => {
|
||||||
return (
|
return (
|
||||||
<ContentFrame tabs>
|
<ContentFrame tabs>
|
||||||
<div className="mt-4 mb-5 space-y-3 font-code text-sm flex flex-col items-start overflow-x-auto">
|
<div className="mt-4 mb-5 space-y-3 font-code text-sm flex flex-col items-start overflow-x-auto">
|
||||||
|
{traces ? (
|
||||||
|
<>
|
||||||
<div className="border hover:border-gray-500 rounded px-1 py-0.5">
|
<div className="border hover:border-gray-500 rounded px-1 py-0.5">
|
||||||
<TransactionAddress
|
<TransactionAddress
|
||||||
address={txData.from}
|
address={txData.from}
|
||||||
|
@ -43,7 +45,7 @@ const Trace: React.FC<TraceProps> = ({ txData, resolvedAddresses }) => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="ml-5 space-y-3">
|
<div className="ml-5 space-y-3">
|
||||||
{traces?.map((t, i, a) => (
|
{traces.map((t, i, a) => (
|
||||||
<TraceItem
|
<TraceItem
|
||||||
key={i}
|
key={i}
|
||||||
t={t}
|
t={t}
|
||||||
|
@ -53,6 +55,12 @@ const Trace: React.FC<TraceProps> = ({ txData, resolvedAddresses }) => {
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<div className="border hover:border-gray-500 rounded px-1 py-1 w-96 h-7">
|
||||||
|
<div className="animate-pulse w-full h-full rounded bg-gray-200"></div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</ContentFrame>
|
</ContentFrame>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue