erlloyd / cardtable

A browser-only project to play a few card games with friends
14 stars 4 forks source link

Add checkbox and api call for private marvel cdb decks #93

Closed tylerjromeo closed 1 year ago

tylerjromeo commented 1 year ago

When loading a deck from marvel cdb, there is a separate api path fro getting private decks and public decks. This checkbox passes a boolean value down the stack to tell the function which path to use. For lotr, there is no private deck API, so we hide the checkbox by changing the game properties to see if there is a private api url configured.

I was not able to test out that the "search deck" option still works, because of cross-origin request issues. I predict it will work fine, since it passes through a "false", but probably worth double checking :)

tested on Firefox, not chrome.

Feel free to correct any React conventions I may have violated, the last time I did react was in 2016, and from the looks of it a lot has changed!