Move redux state to react-query - account states (#6140)

* Fix typecheck errors

* Move redux state to react-query - account states

* TestProviders

* Add release notes for PR #6140

* Fix lint error

* Fix TestProviders

* Coderabbit feedback

* Cleanup

* [autofix.ci] apply automated fixes

* Fix TestProviders

* Fix onbudget and offbudget displaying closed accounts

* [skip ci] Change category to Maintenance and update migration text

* Replace logger calls in desktop-client to console

* Fix lint errors

* Clear react query on closing of budget file similar to redux resetApp action

* [autofix.ci] apply automated fixes

* Remove sendThrow

* Code review feedback

* [autofix.ci] apply automated fixes

* Fix import

* Fix import

* Coderabbit feedback

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Joel Jeremy Marquez
2026-02-14 01:32:37 -08:00
committed by GitHub
parent 5062fa78a8
commit 465608c76b
35 changed files with 1199 additions and 945 deletions

View File

@@ -8,7 +8,7 @@ import { Text } from '@actual-app/components/text';
import { theme } from '@actual-app/components/theme';
import { View } from '@actual-app/components/view';
import { unlinkAccount } from '@desktop-client/accounts/accountsSlice';
import { useUnlinkAccountMutation } from '@desktop-client/accounts';
import { BankSyncCheckboxOptions } from '@desktop-client/components/banksync/BankSyncCheckboxOptions';
import { FieldMapping } from '@desktop-client/components/banksync/FieldMapping';
import { useBankSyncAccountSettings } from '@desktop-client/components/banksync/useBankSyncAccountSettings';
@@ -54,6 +54,7 @@ export function MobileBankSyncAccountEditPage() {
navigate('/bank-sync');
};
const unlinkAccount = useUnlinkAccountMutation();
const handleUnlink = () => {
dispatch(
pushModal({
@@ -64,8 +65,12 @@ export function MobileBankSyncAccountEditPage() {
isViewBankSyncSettings: true,
onUnlink: () => {
if (accountId) {
dispatch(unlinkAccount({ id: accountId }));
navigate('/bank-sync');
unlinkAccount.mutate(
{ id: accountId },
{
onSuccess: () => navigate('/bank-sync'),
},
);
}
},
},