Skip to content

Commit

Permalink
Settings: Chain info formatting + i18n (Joystream#2342) (Joystream#3987)
Browse files Browse the repository at this point in the history
Co-authored-by: Joystream Stats <dev@joystreamstats.live>
  • Loading branch information
2 people authored and XxFlameCatxX committed Jan 14, 2023
1 parent fd94b22 commit 5f8dcbe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
10 changes: 3 additions & 7 deletions packages/ui/src/app/pages/Settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,13 @@ export const Settings = () => {
<PolkadotAppInfo rpcUrl={endpoints.nodeRpcEndpoint} />
</>
)}
<SettingsInformation icon={<WarnedIcon />} title="Chain Informations">
<SettingsInformation icon={<WarnedIcon />} title={t('chainInfo')}>
<ColumnGapBlock gap={5}>
<TextMedium lighter bold>
RPC blockheight:{' '}
</TextMedium>
<TextMedium lighter>t('rpcBlockheight')</TextMedium>
<TextMedium lighter>{formatTokenValue(header?.number.toNumber())}</TextMedium>
</ColumnGapBlock>
<ColumnGapBlock gap={5}>
<TextMedium lighter bold>
QueryNode blockheight:{' '}
</TextMedium>
<TextMedium lighter>t('qnBlockheight')</TextMedium>
<TextMedium lighter>{formatTokenValue(queryNodeState?.indexerHead)}</TextMedium>
</ColumnGapBlock>
</SettingsInformation>
Expand Down
5 changes: 4 additions & 1 deletion packages/ui/src/services/i18n/dict/en/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
"networkDetails": "Network Details",
"networkAddress": "Network: ",
"QueryNodeAddress": "Query Node: ",
"faucet": "Faucet: "
"faucet": "Faucet: ",
"chainInfo": "Chain Information",
"rpcBlockheight": "RPC Block Height: ",
"qnBlockheight": "Query Node Block Height: "
}

0 comments on commit 5f8dcbe

Please sign in to comment.