Skip to content

Commit

Permalink
undo changes from other branch
Browse files Browse the repository at this point in the history
  • Loading branch information
shaankhosla committed Sep 9, 2023
1 parent a576516 commit f47e9f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
15 changes: 5 additions & 10 deletions packages/desktop-client/src/components/accounts/Reconcile.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,15 @@ export function ReconcilingMessage({
}

export function ReconcileTooltip({ account, onReconcile, onClose }) {
let balanceQuery = queries.accountBalance(account);
let clearedBalance = useSheetValue({
name: balanceQuery.name + '-cleared',
value: null,
query: balanceQuery.query.filter({ cleared: true }),
});
let balance = useSheetValue(queries.accountBalance(account));
let format = useFormat();

function onSubmit(e) {
e.preventDefault();
let input = e.target.elements[0];
let amount = currencyToInteger(input.value);
if (amount != null) {
onReconcile(amount == null ? clearedBalance : amount);
onReconcile(amount == null ? balance : amount);
onClose();
} else {
input.select();
Expand All @@ -124,10 +119,10 @@ export function ReconcileTooltip({ account, onReconcile, onClose }) {
reconcile with:
</Text>
<form onSubmit={onSubmit}>
{clearedBalance != null && (
{balance != null && (
<InitialFocus>
<Input
defaultValue={format(clearedBalance, 'financial')}
defaultValue={format(balance, 'financial')}
style={{ margin: '7px 0' }}
/>
</InitialFocus>
Expand All @@ -137,4 +132,4 @@ export function ReconcileTooltip({ account, onReconcile, onClose }) {
</View>
</Tooltip>
);
}
}

Check warning on line 135 in packages/desktop-client/src/components/accounts/Reconcile.js

View workflow job for this annotation

GitHub Actions / lint

Insert `⏎`
6 changes: 0 additions & 6 deletions upcoming-release-notes/1678.md

This file was deleted.

0 comments on commit f47e9f2

Please sign in to comment.