asi-calculator/components/TokenLogo/TokenLogo.tsx
Matthias Kretschmann 436babf4ba
add CUDOS calculations (#40)
* add CUDOS calculations

* content updates

* token order switch

* uniswap quote fix

* list & link community proposals

* migration tool scenario simplification

* rename Uniswap label

* ratio harmonization

* buy ratio fix

* copy updates

* copy updates

* default to 1000 CUDOS
2024-09-19 21:01:39 +01:00

39 lines
955 B
TypeScript

import agixImage from '@/images/agix.png'
import asiImage from '@/images/asi.png'
import cudosImage from '@/images/cudos.png'
import fetImage from '@/images/fet.png'
import oceanImage from '@/images/ocean.png'
import type { Token } from '@/types'
import styles from './TokenLogo.module.css'
export function TokenLogo({
token,
size = 24
}: {
token: Token | undefined
size?: number
}) {
const imageSrc =
token?.symbol === 'OCEAN'
? oceanImage
: token?.symbol === 'AGIX'
? agixImage
: token?.symbol === 'ASI'
? asiImage
: token?.symbol === 'CUDOS'
? cudosImage
: fetImage
return token ? (
<span className={styles.logo} data-symbol={token.symbol}>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={imageSrc.src}
width={size}
height={size}
alt={`${token.symbol} Logo`}
/>
</span>
) : null
}