11 Commits

Author SHA1 Message Date
Dan Albert
febcbce413
Key the PrimaryMarker with destination presence.
This is how React recommend dealing with derived state that needs to be
reset:
https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html

The problem is that the new turn will give the component new props, but
new props will not cause the state to be reset. We can either do that
manually (which React recommends only for the cases where it is
absolutely necessary:
https://reactjs.org/docs/hooks-faq.html#how-do-i-implement-getderivedstatefromprops),
or by forcing the component to be replaced by using a key.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2388.
2022-10-16 12:51:17 +02:00
Dan Albert
b478e9c3af
Split up the ControlPoint.tsx monolith.
This is in need of some serious refactoring so that
https://github.com/dcs-liberation/dcs_liberation/issues/2388 can be
fixed.
2022-10-16 12:51:17 +02:00
Dan Albert
6c388bd557
Factor out control point location event behavior. 2022-10-16 12:51:16 +02:00
Dan Albert
f0a30b5cb7
Document primary/secondary CP marker behavior. 2022-10-16 12:51:16 +02:00
Dan Albert
4b4336391a Remove hand written API objects. 2022-03-06 23:42:23 -08:00
Dan Albert
30aebf2546 Replace api.ts with auto-generated API.
All the slices will come later.
2022-03-06 18:23:52 -08:00
Dan Albert
995e28cb32 Support mobile CPs in the new map.
https://github.com/dcs-liberation/dcs_liberation/issues/2039
2022-03-05 15:41:58 -08:00
Dan Albert
a710ce5e1b Run prettier across the react source. 2022-03-03 23:34:18 -08:00
Dan Albert
92236a5bc3 Update the react map for some new events. 2022-03-03 23:31:07 -08:00
Dan Albert
781f8fb0e8 Fix a few display discrepancies in the new map. 2022-03-02 23:44:46 -08:00
Dan Albert
6ff9208d46 Reorganize React project structure.
Whatever I was doing was getting out of control :)
2022-03-01 01:14:21 -08:00