Fix type error
This commit is contained in:
parent
f335395341
commit
6bd4373ee9
|
@ -34,7 +34,7 @@ const AccountPerformance = () => {
|
||||||
|
|
||||||
const mangoAccount = useMangoStore((s) => s.selectedMangoAccount.current)
|
const mangoAccount = useMangoStore((s) => s.selectedMangoAccount.current)
|
||||||
const [hourlyPerformanceStats, setHourlyPerformanceStats] = useState<any>([])
|
const [hourlyPerformanceStats, setHourlyPerformanceStats] = useState<any>([])
|
||||||
const [uniqueSymbols, setUniqueSymbols] = useState([])
|
const [uniqueSymbols, setUniqueSymbols] = useState<string[]>([])
|
||||||
const [chartData, setChartData] = useState([])
|
const [chartData, setChartData] = useState([])
|
||||||
const [loading, setLoading] = useState(false)
|
const [loading, setLoading] = useState(false)
|
||||||
const [selectedSymbols, setSelectedSymbols] = useState(['ALL'])
|
const [selectedSymbols, setSelectedSymbols] = useState(['ALL'])
|
||||||
|
@ -134,7 +134,7 @@ const AccountPerformance = () => {
|
||||||
let entries: any = Object.entries(parsedResponse)
|
let entries: any = Object.entries(parsedResponse)
|
||||||
entries = entries.map(([key, value]) => [key, Object.entries(value)]).reverse()
|
entries = entries.map(([key, value]) => [key, Object.entries(value)]).reverse()
|
||||||
|
|
||||||
setUniqueSymbols([... new Set([].concat(
|
setUniqueSymbols([... new Set(([] as string[]).concat(
|
||||||
['ALL'],
|
['ALL'],
|
||||||
...entries.map(([_, tokens]) => tokens.map(([token, _]) => token)),
|
...entries.map(([_, tokens]) => tokens.map(([token, _]) => token)),
|
||||||
))])
|
))])
|
||||||
|
|
|
@ -55,7 +55,6 @@ import { Menu, Transition } from '@headlessui/react'
|
||||||
import { useWallet } from '@solana/wallet-adapter-react'
|
import { useWallet } from '@solana/wallet-adapter-react'
|
||||||
import { handleWalletConnect } from 'components/ConnectWalletButton'
|
import { handleWalletConnect } from 'components/ConnectWalletButton'
|
||||||
import { MangoAccountLookup } from 'components/account_page/MangoAccountLookup'
|
import { MangoAccountLookup } from 'components/account_page/MangoAccountLookup'
|
||||||
import AccountPerformance from 'components/account_page/AccountPerformance'
|
|
||||||
|
|
||||||
export async function getStaticProps({ locale }) {
|
export async function getStaticProps({ locale }) {
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue