Skip to content

Commit

Permalink
Fix typecheck error
Browse files Browse the repository at this point in the history
  • Loading branch information
joel-jeremy committed Jan 8, 2025
1 parent 6b04b97 commit 5867e42
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/desktop-client/src/components/sidebar/Account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import { css, cx } from '@emotion/css';

import {
openAccountCloseModal,
reopenAccount,
updateAccount,
} from 'loot-core/client/actions';
import * as Platform from 'loot-core/client/platform';
import { type AccountEntity } from 'loot-core/src/types/models';
Expand Down Expand Up @@ -34,6 +32,7 @@ import {
} from '../sort';
import { type SheetFields, type Binding } from '../spreadsheet';
import { CellValue } from '../spreadsheet/CellValue';
import { reopenAccount, updateAccount } from 'loot-core/client/queries/queriesSlice';

export const accountNameStyle: CSSProperties = {
marginTop: -2,
Expand Down Expand Up @@ -197,8 +196,10 @@ export function Account<FieldName extends SheetFields<'account'>>({
if (newAccountName.trim() !== '') {
dispatch(
updateAccount({
...account,
name: newAccountName,
account: {
...account,
name: newAccountName,
}
}),
);
}
Expand Down Expand Up @@ -233,7 +234,7 @@ export function Account<FieldName extends SheetFields<'account'>>({
break;
}
case 'reopen': {
dispatch(reopenAccount(account.id));
dispatch(reopenAccount({ accountId: account.id }));
break;
}
case 'rename': {
Expand Down

0 comments on commit 5867e42

Please sign in to comment.