2024-03-29 21:37:30 +01:00
|
|
|
import styles from './Result.module.css'
|
2024-03-29 22:54:07 +01:00
|
|
|
import { formatNumber } from '../utils'
|
2024-03-29 21:37:30 +01:00
|
|
|
|
2024-03-29 19:54:14 +01:00
|
|
|
type Props = {
|
|
|
|
symbol: string
|
|
|
|
amount: number
|
|
|
|
amountAsi: number
|
|
|
|
amountFiat: number
|
|
|
|
}
|
|
|
|
|
|
|
|
export function Result({ symbol, amount, amountAsi, amountFiat }: Props) {
|
|
|
|
return (
|
2024-03-29 21:37:30 +01:00
|
|
|
<div className={styles.result}>
|
2024-03-29 22:54:07 +01:00
|
|
|
<p>{formatNumber(amount, symbol)}</p>
|
2024-03-29 21:37:30 +01:00
|
|
|
<p>
|
2024-03-29 22:54:07 +01:00
|
|
|
→{' '}
|
|
|
|
<strong title={`${amountAsi}`}>{formatNumber(amountAsi, 'ASI')}</strong>{' '}
|
|
|
|
= <strong>{formatNumber(amountFiat, 'USD')}</strong>
|
2024-03-29 21:37:30 +01:00
|
|
|
</p>
|
|
|
|
</div>
|
2024-03-29 19:54:14 +01:00
|
|
|
)
|
|
|
|
}
|