Skip to content

Commit

Permalink
fix(widgets): blocks widget handle missing value
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuhvi authored and limpbrains committed Nov 29, 2022
1 parent 871a46f commit 6323248
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/components/BlocksWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,25 @@ const BlocksWidget = ({
<BaseFeedWidget
url={url}
name="Bitcoin Blocks"
label={value?.height}
label={value?.height || ''}
icon={<CubeIcon width={32} height={32} />}
isEditing={isEditing}
onPress={onPress}
right={
<View style={styles.numbers}>
<Text01M numberOfLines={1} styles={styles.price}>
{`${value?.transacionCount} / ${value?.size}`}
</Text01M>
<Caption13M styles={styles.change} color="gray1" numberOfLines={1}>
{value?.time}
</Caption13M>
{value && (
<>
<Text01M numberOfLines={1} styles={styles.price}>
{`${value?.transacionCount} / ${value?.size}`}
</Text01M>
<Caption13M
styles={styles.change}
color="gray1"
numberOfLines={1}>
{value?.time}
</Caption13M>
</>
)}
</View>
}
/>
Expand Down

0 comments on commit 6323248

Please sign in to comment.