From a456b55a32ba45ac04c234b99139e7735f1d613b Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Wed, 4 Aug 2021 18:42:46 +0300 Subject: [PATCH] fix lint error --- .../pages/Account/History/index.tsx | 20 +++++++++---------- src/components/pages/Account/index.tsx | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/pages/Account/History/index.tsx b/src/components/pages/Account/History/index.tsx index dcd1163aa..2a54e7b98 100644 --- a/src/components/pages/Account/History/index.tsx +++ b/src/components/pages/Account/History/index.tsx @@ -15,24 +15,23 @@ interface HistoryTab { content: JSX.Element } -function getTabs(accountIdentifier: string): HistoryTab[] { - const { accountId } = useWeb3() +function getTabs(accountId: string, userAccountId: string): HistoryTab[] { const defaultTabs: HistoryTab[] = [ { title: 'Published', - content: + content: }, { title: 'Pool Shares', - content: + content: }, { title: 'Pool Transactions', - content: + content: }, { title: 'Downloads', - content: + content: } ] const computeTab: HistoryTab = { @@ -43,21 +42,22 @@ function getTabs(accountIdentifier: string): HistoryTab[] { ) } - if (accountIdentifier === accountId) { + if (accountId === userAccountId) { defaultTabs.push(computeTab) } return defaultTabs } export default function HistoryPage({ - accountId + accountIdentifier }: { - accountId: string + accountIdentifier: string }): ReactElement { const { chainIds } = useUserPreferences() + const { accountId } = useWeb3() const url = new URL(window.location.href) const defaultTab = url.searchParams.get('defaultTab') - const tabs = getTabs(accountId) + const tabs = getTabs(accountIdentifier, accountId) let defaultTabIndex = 0 defaultTab === 'ComputeJobs' ? (defaultTabIndex = 4) : (defaultTabIndex = 0) return ( diff --git a/src/components/pages/Account/index.tsx b/src/components/pages/Account/index.tsx index 158df829a..954599e35 100644 --- a/src/components/pages/Account/index.tsx +++ b/src/components/pages/Account/index.tsx @@ -17,7 +17,7 @@ export default function AccountPage({ ) : (

Please connect your Web3 wallet.

)} - + ) }