lijim / monks-and-mages

Monks and Mages is a TCG-game built on React and socket.io
https://www.monksandmages.com
MIT License
17 stars 0 forks source link

Feat: Highlight the selected deck #406

Closed lijim closed 1 year ago

lijim commented 1 year ago

Made a big refactor to use redux everywhere for the deck builder in order to add highlighted state to the Saved Deck component.

This was done in preparation for #389, as in order to let users edit a deck, we need to have a concept of which deck it is that they're editing

It makes the most sense to do this all inside of Redux because: 1.) It's easy to visually inspect and debug 2.) We were doing a bunch of prop pass-downs inside of the DeckBuilder's component tree. This allows us to lift state up into redux and not do those pass-downs (e.g. addCard, removeCard, setSkeleton, etc.)

https://user-images.githubusercontent.com/1839462/221841354-2d39917f-5ce3-48f5-af72-bed6c24f68df.mov