diff --git a/components/account_page/AccountPerformancePerToken.tsx b/components/account_page/AccountPerformancePerToken.tsx index f57a8b37..fb1cb203 100644 --- a/components/account_page/AccountPerformancePerToken.tsx +++ b/components/account_page/AccountPerformancePerToken.tsx @@ -34,7 +34,7 @@ const AccountPerformance = () => { const mangoAccount = useMangoStore((s) => s.selectedMangoAccount.current) const [hourlyPerformanceStats, setHourlyPerformanceStats] = useState([]) - const [uniqueSymbols, setUniqueSymbols] = useState([]) + const [uniqueSymbols, setUniqueSymbols] = useState([]) const [chartData, setChartData] = useState([]) const [loading, setLoading] = useState(false) const [selectedSymbols, setSelectedSymbols] = useState(['ALL']) @@ -134,7 +134,7 @@ const AccountPerformance = () => { let entries: any = Object.entries(parsedResponse) entries = entries.map(([key, value]) => [key, Object.entries(value)]).reverse() - setUniqueSymbols([... new Set([].concat( + setUniqueSymbols([... new Set(([] as string[]).concat( ['ALL'], ...entries.map(([_, tokens]) => tokens.map(([token, _]) => token)), ))]) diff --git a/pages/account.tsx b/pages/account.tsx index 4ad5050b..c0308439 100644 --- a/pages/account.tsx +++ b/pages/account.tsx @@ -55,7 +55,6 @@ import { Menu, Transition } from '@headlessui/react' import { useWallet } from '@solana/wallet-adapter-react' import { handleWalletConnect } from 'components/ConnectWalletButton' import { MangoAccountLookup } from 'components/account_page/MangoAccountLookup' -import AccountPerformance from 'components/account_page/AccountPerformance' export async function getStaticProps({ locale }) { return {