mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
* update contracts * add version selector * show banner on all pages * show banner on all pages * Announcement/warning messages cleanup * new main announcement message * contextual compute-to-data warnings in publish form & asset action * copy update * change hardcoded URLs * change localStorage key * to prevent user preferences clashes when switching between v3 & v4 * footer stats note changes * move copy into content file * mention external markets * footer stats note copy changes * modified pool widget footer * take out pool reserve display * style & spacing updates for fees Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
48 lines
1.4 KiB
TypeScript
48 lines
1.4 KiB
TypeScript
import React, { ReactElement } from 'react'
|
|
import Conversion from '@shared/Price/Conversion'
|
|
import PriceUnit from '@shared/Price/PriceUnit'
|
|
import NetworkName from '@shared/NetworkName'
|
|
import styles from './Tooltip.module.css'
|
|
import { StatsValue } from './_types'
|
|
import content from '../../../../content/footer.json'
|
|
import Markdown from '@shared/Markdown'
|
|
|
|
export default function MarketStatsTooltip({
|
|
totalValueLockedInOcean,
|
|
poolCount,
|
|
totalOceanLiquidity,
|
|
mainChainIds
|
|
}: {
|
|
totalValueLockedInOcean: StatsValue
|
|
poolCount: StatsValue
|
|
totalOceanLiquidity: StatsValue
|
|
mainChainIds: number[]
|
|
}): ReactElement {
|
|
return (
|
|
<>
|
|
<ul className={styles.statsList}>
|
|
{mainChainIds?.map((chainId, key) => (
|
|
<li className={styles.tooltipStats} key={key}>
|
|
<NetworkName networkId={chainId} className={styles.network} />
|
|
<br />
|
|
<Conversion
|
|
price={totalValueLockedInOcean?.[chainId] || '0'}
|
|
hideApproximateSymbol
|
|
/>{' '}
|
|
<abbr title="Total Value Locked">TVL</abbr>
|
|
{' | '}
|
|
<strong>{poolCount?.[chainId] || '0'}</strong> pools
|
|
{' | '}
|
|
<PriceUnit
|
|
price={totalOceanLiquidity?.[chainId] || '0'}
|
|
symbol="OCEAN"
|
|
size="small"
|
|
/>
|
|
</li>
|
|
))}
|
|
</ul>
|
|
<Markdown className={styles.note} text={content.stats.note} />
|
|
</>
|
|
)
|
|
}
|