Skip to content

Commit

Permalink
Final touches
Browse files Browse the repository at this point in the history
  • Loading branch information
blazejkustra committed Nov 7, 2023
1 parent bb73ab2 commit d4c9ad6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/CurrentWalletBalance.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import {TextStyle} from 'react-native';
import {StyleProp, TextStyle} from 'react-native';
import {OnyxEntry, withOnyx} from 'react-native-onyx';
import * as CurrencyUtils from '@libs/CurrencyUtils';
import styles from '@styles/styles';
Expand All @@ -13,12 +13,12 @@ type CurrentWalletBalanceOnyxProps = {
};

type CurrentWalletBalanceProps = CurrentWalletBalanceOnyxProps & {
balanceStyles?: TextStyle[];
balanceStyles?: StyleProp<TextStyle>;
};

function CurrentWalletBalance({userWallet, balanceStyles = []}: CurrentWalletBalanceProps) {
function CurrentWalletBalance({userWallet, balanceStyles}: CurrentWalletBalanceProps) {
const formattedBalance = CurrencyUtils.convertToDisplayString(userWallet?.currentBalance ?? 0);
return <Text style={[styles.pv5, styles.alignSelfCenter, styles.textHeadline, styles.textXXXLarge, ...balanceStyles]}>{`${formattedBalance}`}</Text>;
return <Text style={[styles.pv5, styles.alignSelfCenter, styles.textHeadline, styles.textXXXLarge, balanceStyles]}>{`${formattedBalance}`}</Text>;
}

CurrentWalletBalance.displayName = 'CurrentWalletBalance';
Expand Down

0 comments on commit d4c9ad6

Please sign in to comment.