2024-03-30 19:27:18 +01:00
|
|
|
'use client'
|
|
|
|
|
|
|
|
import { ratioOceanToAsi, ratioAgixToAsi, ratioFetToAsi } from '@/constants'
|
|
|
|
import styles from './CalculationBase.module.css'
|
|
|
|
import { usePrices } from '@/hooks'
|
2024-03-31 16:48:31 +02:00
|
|
|
import { Label } from '@/components/Label'
|
2024-03-30 19:27:18 +01:00
|
|
|
|
|
|
|
export function CalculationBase() {
|
2024-03-31 15:24:07 +02:00
|
|
|
const { prices, isValidating } = usePrices()
|
2024-03-30 19:27:18 +01:00
|
|
|
|
|
|
|
return (
|
|
|
|
<ul className={styles.calculationBase}>
|
|
|
|
<li>
|
2024-03-31 15:24:07 +02:00
|
|
|
<p>1 ASI</p>
|
|
|
|
<p className={isValidating ? 'isValidating' : ''}>= ${prices.asi}</p>
|
2024-03-30 19:27:18 +01:00
|
|
|
</li>
|
2024-03-30 23:10:36 +01:00
|
|
|
<li>
|
2024-03-31 15:24:07 +02:00
|
|
|
<p>
|
|
|
|
1 Fet = {ratioFetToAsi} ASI
|
|
|
|
<Label>fixed</Label>
|
|
|
|
</p>
|
|
|
|
<p className={isValidating ? 'isValidating' : ''}>= ${prices.fet}</p>
|
2024-03-30 23:10:36 +01:00
|
|
|
</li>
|
2024-03-30 19:27:18 +01:00
|
|
|
<li>
|
2024-03-31 15:24:07 +02:00
|
|
|
<p>
|
|
|
|
1 OCEAN = {ratioOceanToAsi} ASI
|
|
|
|
<Label>fixed</Label>
|
|
|
|
</p>
|
|
|
|
<p className={isValidating ? 'isValidating' : ''}>= ${prices.ocean}</p>
|
2024-03-30 19:27:18 +01:00
|
|
|
</li>
|
|
|
|
<li>
|
2024-03-31 15:24:07 +02:00
|
|
|
<p>
|
|
|
|
1 AGIX = {ratioAgixToAsi} ASI
|
|
|
|
<Label>fixed</Label>
|
|
|
|
</p>
|
|
|
|
<p className={isValidating ? 'isValidating' : ''}>= ${prices.agix}</p>
|
2024-03-30 19:27:18 +01:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
)
|
|
|
|
}
|