mirror of
https://github.com/kremalicious/asi-calculator.git
synced 2024-12-22 17:33:18 +01:00
Matthias Kretschmann
ef42f24ab5
* add throughout UI as token logo * add all favicon files, social image
36 lines
841 B
TypeScript
36 lines
841 B
TypeScript
import { Token } from '@/types'
|
|
import styles from './TokenLogo.module.css'
|
|
import oceanImage from '@/images/ocean.png'
|
|
import agixImage from '@/images/agix.png'
|
|
import fetImage from '@/images/fet.png'
|
|
import asiImage from '@/images/asi.png'
|
|
|
|
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
|
|
: 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
|
|
}
|