-
Notifications
You must be signed in to change notification settings - Fork 55
Conversation
background: grey; | ||
background: ${({ symbol, theme }) => | ||
`url(${ | ||
symbol === 'GNO' ? LogoGNO : symbol === 'ETH' ? LogoETH : symbol === 'USDC' ? LogoUSDC : theme.blueShade3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function would likely be cleaner, but given this limited scope of 3 token symbols......
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still don't know how to simplify this where I can use the prop symbol
as the variable name instead. So that we could do: url(${symbol}.png
.
Perhaps like props[symbol]
=> 'GNO'
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just make a map that has token symbol as keys and logo as values
const TokenSymbolToLogoMap = {
GNO: GNOLogo,
// ...rest
}
Ideally we have some enum of the claim tokens you can use as dynamic keys
|
Great! |
Add token symbol images.
Summary
Adds token symbol images
ToDo notes:
.