Skip to content

Commit

Permalink
format commas in NetworkInfo view
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamkmr04 committed Dec 13, 2024
1 parent 4274e04 commit 5332ece
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions views/NetworkInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Screen from '../components/Screen';

import { localeString } from '../utils/LocaleUtils';
import { themeColor } from '../utils/ThemeUtils';
import { numberWithCommas } from '../utils/UnitsUtils';

import NodeInfoStore from '../stores/NodeInfoStore';

Expand Down Expand Up @@ -72,13 +73,17 @@ export default class NetworkInfo extends React.Component<NetworkInfoProps, {}> {

<FlatList
data={NETWORK_INFO}
renderItem={({ item }) => (
renderItem={({ item, index }) => (
<KeyValue
keyValue={localeString(item.label)}
value={item.value}
value={
index < 3
? numberWithCommas(item.value)
: item.value
}
/>
)}
onRefresh={() => getNetworkInfo}
onRefresh={() => getNetworkInfo()}
refreshing={loading}
style={styles.content}
/>
Expand Down

0 comments on commit 5332ece

Please sign in to comment.