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

Fix: patch opacity regression for deck builder #423

Closed lijim closed 1 year ago

lijim commented 1 year ago

On https://github.com/lijim/monks-and-mages/pull/421, we introduced having 0.7 opacity for cards that had no onClick, but our logic was flawed in that it prevented places like the regular deck builder (not draft mode's deck builder) from having proper tinting on the CompactDeckList component:

Screen Shot 2023-03-15 at 4 17 30 AM

This patch introduces logic to consolidate where we do an early return in onClick and make that the basis for whether to display cursor: pointer / have higher/lower opacity

Screen Shot 2023-03-15 at 4 18 09 AM