mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-28 18:40:34 -05:00
Coderabbit feedback
This commit is contained in:
@@ -811,11 +811,9 @@ export function useSyncAccountsMutation() {
|
||||
},
|
||||
onSuccess: invalidateAccountLists,
|
||||
onError: error => {
|
||||
console.error('Error linking account to PluggyAI:', error);
|
||||
console.error('Error syncing accounts:', error);
|
||||
dispatchErrorNotification(
|
||||
t(
|
||||
'There was an error linking the account to PluggyAI. Please try again.',
|
||||
),
|
||||
t('There was an error syncing accounts. Please try again.'),
|
||||
);
|
||||
throw error;
|
||||
},
|
||||
@@ -944,11 +942,9 @@ export function useSyncAndDownloadMutation() {
|
||||
},
|
||||
onSuccess: invalidateAccountLists,
|
||||
onError: error => {
|
||||
console.error('Error linking account to PluggyAI:', error);
|
||||
console.error('Error syncing accounts:', error);
|
||||
dispatchErrorNotification(
|
||||
t(
|
||||
'There was an error linking the account to PluggyAI. Please try again.',
|
||||
),
|
||||
t('There was an error syncing accounts. Please try again.'),
|
||||
);
|
||||
throw error;
|
||||
},
|
||||
|
||||
@@ -14,7 +14,7 @@ export const accountQueries = {
|
||||
return accounts;
|
||||
},
|
||||
placeholderData: [],
|
||||
// Manually invalidated when categories change
|
||||
// Manually invalidated when accounts change
|
||||
staleTime: Infinity,
|
||||
}),
|
||||
listOnBudget: () =>
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
type CategoryGroupEntity,
|
||||
} from 'loot-core/types/models';
|
||||
|
||||
import { categoryQueries } from '.';
|
||||
import { categoryQueries } from './queries';
|
||||
|
||||
import { pushModal } from '@desktop-client/modals/modalsSlice';
|
||||
import { addNotification } from '@desktop-client/notifications/notificationsSlice';
|
||||
|
||||
@@ -65,7 +65,6 @@ export function CreateLocalAccountModal() {
|
||||
setBalanceError(balanceError);
|
||||
|
||||
if (!nameError && !balanceError) {
|
||||
dispatch(closeModal());
|
||||
createAccount.mutate(
|
||||
{
|
||||
name,
|
||||
@@ -74,6 +73,7 @@ export function CreateLocalAccountModal() {
|
||||
},
|
||||
{
|
||||
onSuccess: id => {
|
||||
dispatch(closeModal());
|
||||
navigate('/accounts/' + id);
|
||||
},
|
||||
},
|
||||
|
||||
@@ -654,7 +654,7 @@ export function ImportTransactionsModal({
|
||||
});
|
||||
}
|
||||
|
||||
await importTransactions.mutate(
|
||||
importTransactions.mutate(
|
||||
{
|
||||
accountId,
|
||||
transactions: finalTransactions,
|
||||
@@ -693,7 +693,7 @@ export function ImportTransactionsModal({
|
||||
);
|
||||
|
||||
// Retreive the transactions that would be updated (along with the existing trx)
|
||||
await importPreviewTransactions.mutate(
|
||||
importPreviewTransactions.mutate(
|
||||
{
|
||||
accountId,
|
||||
transactions: previewTransactionsToImport,
|
||||
|
||||
Reference in New Issue
Block a user