Skip to content

Commit

Permalink
Display the number of chars
Browse files Browse the repository at this point in the history
  • Loading branch information
lcswillems committed Dec 13, 2024
1 parent a8ab02c commit 5b8329f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions website/app/data-converter/pageClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ const DataConverter = () => {
queryKey: ["proxyUrl", proxyUrl, "address", address],
queryFn: () => new Proxy(proxyUrl).getSerializableAccount(address),
});
const addressMainnetState = JSON.stringify(query.data, null, 2);
const addressMainnetState = query.data
? JSON.stringify(query.data, null, 2)
: undefined;

return (
<Box maxW="breakpoint-2xl" mx="auto" px="4">
Expand Down Expand Up @@ -102,8 +104,10 @@ const DataConverter = () => {
</Clipboard.Trigger>
</Clipboard.Root>
<Box mb="8" />
<Box as="pre" overflow="auto">
{addressMainnetState}
<Box>
{addressMainnetState !== undefined
? `Chars: ${addressMainnetState.length}`
: undefined}
</Box>
<Box mb="8" />
</Box>
Expand Down

0 comments on commit 5b8329f

Please sign in to comment.