update recharts

This commit is contained in:
saml33 2023-07-12 10:26:37 +10:00
parent d5d58626fc
commit 57b7045d5a
7 changed files with 15 additions and 14 deletions

View File

@ -15,12 +15,7 @@ import MarketLogos from '@components/trade/MarketLogos'
import mangoStore from '@store/mangoStore'
import TokensHealthTable from './TokensHealthTable'
import MarketsHealthTable from './MarketsHealthTable'
export interface HealthContribution {
asset: string
contribution: number
isAsset: boolean
}
import { HealthContribution } from 'types'
const HealthContributions = ({ hideView }: { hideView: () => void }) => {
const { t } = useTranslation(['common', 'account', 'trade'])

View File

@ -9,11 +9,11 @@ import {
SectorProps,
} from 'recharts'
import { COLORS } from 'styles/colors'
import { HealthContribution } from './HealthContributions'
import { useMemo } from 'react'
import { formatCurrencyValue } from 'utils/numbers'
import { useViewport } from 'hooks/useViewport'
import { breakpoints } from 'utils/theme'
import { HealthContribution } from 'types'
const HealthContributionsChart = ({
data,

View File

@ -4,13 +4,13 @@ import Tooltip from '@components/shared/Tooltip'
import { Disclosure, Transition } from '@headlessui/react'
import { ChevronDownIcon } from '@heroicons/react/20/solid'
import { useTranslation } from 'next-i18next'
import { HealthContribution } from './HealthContributions'
import useMangoGroup from 'hooks/useMangoGroup'
import useMangoAccount from 'hooks/useMangoAccount'
import { useViewport } from 'hooks/useViewport'
import { breakpoints } from 'utils/theme'
import { MouseEventHandler } from 'react'
import MarketLogos from '@components/trade/MarketLogos'
import { HealthContribution } from 'types'
const MarketsHealthTable = ({
initMarkets,

View File

@ -5,12 +5,12 @@ import Tooltip from '@components/shared/Tooltip'
import { Disclosure, Transition } from '@headlessui/react'
import { ChevronDownIcon } from '@heroicons/react/20/solid'
import { useTranslation } from 'next-i18next'
import { HealthContribution } from './HealthContributions'
import useMangoGroup from 'hooks/useMangoGroup'
import useMangoAccount from 'hooks/useMangoAccount'
import { useViewport } from 'hooks/useViewport'
import { breakpoints } from 'utils/theme'
import { MouseEventHandler } from 'react'
import { HealthContribution } from 'types'
const TokensHealthTable = ({
initTokens,

View File

@ -70,7 +70,7 @@
"react-number-format": "4.9.2",
"react-tsparticles": "2.2.4",
"react-window": "1.8.7",
"recharts": "2.5.0",
"recharts": "2.7.2",
"tsparticles": "2.2.4",
"walktour": "5.1.1",
"webpack-node-externals": "3.0.0",

View File

@ -413,3 +413,9 @@ export type TickerData = {
target_volume: string
ticker_id: string
}
export interface HealthContribution {
asset: string
contribution: number
isAsset: boolean
}

View File

@ -7339,10 +7339,10 @@ recharts-scale@^0.4.4:
dependencies:
decimal.js-light "^2.4.1"
recharts@2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/recharts/-/recharts-2.5.0.tgz#34452852509099502690f9d2a72bde1d4cd65648"
integrity sha512-0EQYz3iA18r1Uq8VqGZ4dABW52AKBnio37kJgnztIqprELJXpOEsa0SzkqU1vjAhpCXCv52Dx1hiL9119xsqsQ==
recharts@2.7.2:
version "2.7.2"
resolved "https://registry.yarnpkg.com/recharts/-/recharts-2.7.2.tgz#6d813681910ad33a4bbf3bdd06c6f64f20b39319"
integrity sha512-HMKRBkGoOXHW+7JcRa6+MukPSifNtJlqbc+JreGVNA407VLE/vOP+8n3YYjprDVVIF9E2ZgwWnL3D7K/LUFzBg==
dependencies:
classnames "^2.2.5"
eventemitter3 "^4.0.1"