Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Add token symbol images. #2207

Merged
merged 6 commits into from
Jan 19, 2022
Merged

Conversation

fairlighteth
Copy link
Contributor

@fairlighteth fairlighteth commented Jan 19, 2022

Summary

Adds token symbol images
Screen Shot 2022-01-19 at 09 35 33
Screen Shot 2022-01-19 at 09 35 23

ToDo notes:

  • Aware that on the final step, in the investment summary, the token symbols should be closer to each other, like on the other pages

Screen Shot 2022-01-19 at 09 40 00

.

background: grey;
background: ${({ symbol, theme }) =>
`url(${
symbol === 'GNO' ? LogoGNO : symbol === 'ETH' ? LogoETH : symbol === 'USDC' ? LogoUSDC : theme.blueShade3
Copy link
Contributor Author

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......

Copy link
Contributor Author

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' ?

Copy link
Contributor

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

@fairlighteth fairlighteth requested review from a team January 19, 2022 08:39
@github-actions
Copy link
Contributor

  • 🔭 GP Swap: Gnosis Protocol v2 Swap UI

@fairlighteth fairlighteth changed the base branch from claim-styleImprove-12 to claim-styleImprove-11 January 19, 2022 10:24
@anxolin anxolin merged commit 250b8af into claim-styleImprove-11 Jan 19, 2022
@elena-zh
Copy link

Great!

@alfetopito alfetopito deleted the claim-styleImprove-13 branch January 19, 2022 14:43
anxolin added a commit to anxolin/cowswap that referenced this pull request Apr 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants