Skip to content

Commit 8abc56a

Browse files
authored
Merge pull request #26 from DVDAGames/develop
Develop
2 parents 1511877 + 08794a0 commit 8abc56a

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/App.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff 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
);

0 commit comments

Comments
 (0)