import styles from './Result.module.css' import { formatCrypto, formatFiat } from '@/lib' import { ArrowRightIcon } from '@radix-ui/react-icons' import { TokenLogo } from '@/components' import { Token } from '@/types' import { useLocale } from '@/features/prices' type Props = { token: Token | undefined amount: number amountAsi: number amountFiat: number amountOriginalFiat?: number isValidating: boolean isLoading: boolean } export function Result({ token, amount, amountAsi, amountFiat, amountOriginalFiat, isValidating, isLoading }: Props) { const locale = useLocale() const feedbackClasses = isLoading ? 'isLoading' : isValidating ? 'isValidating' : '' return (

{formatCrypto(amount || 0, token?.symbol || '', locale)}

{amountOriginalFiat ? (

{formatFiat(amountOriginalFiat || 0, 'USD', locale)}

) : null}

{formatCrypto(amountAsi || 0, 'ASI', locale)}

{formatFiat(amountFiat || 0, 'USD', locale)}

) }