A local-first personal finance app
fix incorrect hook usage in #3277 (#3356)
Matt Fiddaman8a4a9ba08305
diff --git a/packages/desktop-client/src/components/accounts/Account.tsx b/packages/desktop-client/src/components/accounts/Account.tsxindex 9c5c938778..07090da96b 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 transactionconst 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.mdnew file mode 100644index 0000000000..f8accb98a2--- /dev/null+++ b/upcoming-release-notes/3356.md@@ -0,0 +1,6 @@+---+category: Bugfix+authors: [matt-fidd]+---++Fix incorrect hook usage in #3277