Coderabbit feedback

This commit is contained in:
Joel Jeremy Marquez
2026-01-06 10:41:40 -08:00
parent 36c97bbb90
commit a66071ccbd
5 changed files with 9 additions and 13 deletions

View File

@@ -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;
},

View File

@@ -14,7 +14,7 @@ export const accountQueries = {
return accounts;
},
placeholderData: [],
// Manually invalidated when categories change
// Manually invalidated when accounts change
staleTime: Infinity,
}),
listOnBudget: () =>

View File

@@ -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';

View File

@@ -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);
},
},

View File

@@ -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,