citycoins / ui

Basic UI components for interacting with the CityCoin contract. Requires Stacks Wallet for Web.
https://minecitycoins.com
GNU General Public License v3.0
28 stars 13 forks source link

Create derived atom for symbol #144

Open whoabuddy opened 2 years ago

whoabuddy commented 2 years ago

Is your feature request related to a problem? Please describe.

On a few different components there is a need to use the symbol throughout in headers, text, placeholders, etc.

The best pattern so far for this is to set a useMemo() hook that sets the symbol based on the current city selection or returns undefined.

Describe the solution you'd like

This feels like it could be generalized further as a derived atom, where the atom value follows the same pattern and can be used on any page where a symbol is needed.