'use client'; import { memo } from 'react'; import { cn, pressable, text } from '../../styles/theme'; import type { TokenRowProps } from '../types'; import { formatAmount } from '../utils/formatAmount'; import { TokenImage } from './TokenImage'; export const TokenRow = memo(function TokenRow({ className, token, amount, onClick, hideImage, hideSymbol, as, }: TokenRowProps) { const Component = as ?? 'button'; return ( onClick?.(token)} > {!hideImage && } {token.name.trim()} {!hideSymbol && ( {token.symbol} )} {formatAmount(amount, { minimumFractionDigits: 2, maximumFractionDigits: Number(amount) < 1 ? 5 : 2, })} ); });