File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,8 +50,10 @@ export const App = () => {
5050 if ( currentEngine ?. id ) {
5151 Store . set ( LOCAL_STORAGE_CURRENT_ENGINE_KEY , currentEngine . id ) ;
5252
53- if ( currentEngine ?. active ) {
54- setActiveHex ( currentEngine . active ) ;
53+ const activeHex = Store . get ( makeStorageKey ( currentEngine . id ) ) ;
54+
55+ if ( activeHex ) {
56+ setActiveHex ( activeHex ) ;
5557 } else {
5658 setActiveHex ( currentEngine . start ) ;
5759 }
@@ -67,6 +69,8 @@ export const App = () => {
6769 } , [ activeHex ] ) ;
6870
6971 useEffect ( ( ) => {
72+ console . log ( currentEngine ?. active ) ;
73+
7074 if ( currentEngine ?. active ) {
7175 Store . set ( makeStorageKey ( currentEngine . id ) , currentEngine . active ) ;
7276 }
@@ -115,7 +119,7 @@ export const App = () => {
115119 if ( activeHexInfo ?. label ) {
116120 return (
117121 < h2 className = { styles . status } >
118- < span class = "visually-hidden" > Status:</ span >
122+ < span className = "visually-hidden" > Status:</ span >
119123 { activeHexInfo . label }
120124 </ h2 >
121125 ) ;
You can’t perform that action at this time.
0 commit comments