Skip to content

Commit

Permalink
Changed Visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
HansiWursti committed Dec 10, 2023
1 parent fdf36de commit 5083d0b
Showing 1 changed file with 25 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import MobileBackButton from '../MobileBackButton';
import { Page } from '../Page';
import PullToRefresh from '../responsive/PullToRefresh';
import CellValue from '../spreadsheet/CellValue';
import useSheetValue from '../spreadsheet/useSheetValue';
import { TransactionList } from '../transactions/MobileTransaction';

function TransactionSearchInput({ accountName, onSearch }) {
Expand Down Expand Up @@ -130,41 +131,48 @@ export default function AccountDetails({
justifyContent: 'space-evenly',
}}
>
<View>
<Label title="BALANCE" style={{ textAlign: 'center' }} />
<View
style={{
visibility:
useSheetValue(balanceUncleared) === 0 ? 'hidden' : 'visible',
}}
>
<Label
title="CLEARED"
style={{ textAlign: 'center', fontSize: 12 }}
/>
<CellValue
binding={balance}
binding={balanceCleared}
type="financial"
style={{
fontSize: 18,
fontSize: 12,
textAlign: 'center',
fontWeight: '500',
}}
getStyle={value => ({
color: value < 0 ? theme.errorText : theme.pillTextHighlighted,
})}
data-testid="account-balance"
data-testid="account-balance-cleared"
/>
</View>
<View>
<Label
title="CLEARED"
style={{ textAlign: 'center', fontSize: 12 }}
/>
<Label title="BALANCE" style={{ textAlign: 'center' }} />
<CellValue
binding={balanceCleared}
binding={balance}
type="financial"
style={{
fontSize: 12,
textAlign: 'center',
fontSize: 18,
fontWeight: '500',
}}
getStyle={value => ({
color: value < 0 ? theme.errorText : theme.pillTextHighlighted,
})}
data-testid="account-balance-cleared"
data-testid="account-balance"
/>
</View>
<View>
<View
style={{
visibility:
useSheetValue(balanceUncleared) === 0 ? 'hidden' : 'visible',
}}
>
<Label
title="UNCLEARED"
style={{ textAlign: 'center', fontSize: 12 }}
Expand All @@ -177,9 +185,6 @@ export default function AccountDetails({
textAlign: 'center',
fontWeight: '500',
}}
getStyle={value => ({
color: value < 0 ? theme.errorText : theme.pillTextHighlighted,
})}
data-testid="account-balance-uncleared"
/>
</View>
Expand Down

0 comments on commit 5083d0b

Please sign in to comment.