diff --git a/packages/desktop-client/src/components/accounts/Account.tsx b/packages/desktop-client/src/components/accounts/Account.tsx index 9c5c9387789708a1d1dfb13db7b9cfe0a82ad7bf..07090da96b887fb8fd3a9f8a6869162f20afbcc3 100644 --- a/packages/desktop-client/src/components/accounts/Account.tsx +++ b/packages/desktop-client/src/components/accounts/Account.tsx @@ -6,7 +6,7 @@ import React, { useMemo, type ReactElement, } from 'react'; -import { Trans, useTranslation } from 'react-i18next'; +import { Trans } from 'react-i18next'; import { useSelector } from 'react-redux'; import { Navigate, useParams, useLocation } from 'react-router-dom'; @@ -597,8 +597,6 @@ class AccountInternal extends PureComponent< }; onImport = async () => { - const { t } = useTranslation(); - const accountId = this.props.accountId; const account = this.props.accounts.find(acct => acct.id === accountId); const categories = await this.props.getCategories(); @@ -629,8 +627,6 @@ class AccountInternal extends PureComponent< }; onExport = async (accountName: string) => { - const { t } = useTranslation(); - const exportedTransactions = await send('transactions-export-query', { query: this.currentQuery.serialize(), }); @@ -951,8 +947,6 @@ class AccountInternal extends PureComponent< }; onCreateReconciliationTransaction = async (diff: number) => { - const { t } = useTranslation(); - // Create a new reconciliation transaction const reconciliationTransactions = realizeTempTransactions([ { @@ -979,8 +973,6 @@ class AccountInternal extends PureComponent< }; onShowTransactions = async (ids: string[]) => { - const { t } = useTranslation(); - this.onApplyFilter({ customName: t('Selected transactions'), queryFilter: { id: { $oneof: ids } }, diff --git a/upcoming-release-notes/3356.md b/upcoming-release-notes/3356.md new file mode 100644 index 0000000000000000000000000000000000000000..f8accb98a21b1664796d88acd440189d04206878 --- /dev/null +++ b/upcoming-release-notes/3356.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [matt-fidd] +--- + +Fix incorrect hook usage in #3277