diff --git a/src/features/settings/settingsSlice.js b/src/features/settings/settingsSlice.js index 9920c095..bfa5a558 100644 --- a/src/features/settings/settingsSlice.js +++ b/src/features/settings/settingsSlice.js @@ -250,6 +250,7 @@ export const selectAllTraders = createSelector([selectSettings], (settings) => { mechanic: settings[settings.gameMode].mechanic, ragman: settings[settings.gameMode].ragman, jaeger: settings[settings.gameMode].jaeger, + ref: settings[settings.gameMode].ref, }; }); diff --git a/src/pages/settings/index.js b/src/pages/settings/index.js index 4415858f..372b4d11 100644 --- a/src/pages/settings/index.js +++ b/src/pages/settings/index.js @@ -74,7 +74,7 @@ function Settings() { const hideDogtagBarters = useSelector((state) => state.settings[state.settings.gameMode].hideDogtagBarters); const gameMode = useSelector((state) => state.settings.gameMode); - const refs = { + const stationRefs = { 'bitcoin-farm': useRef(null), 'booze-generator': useRef(null), 'christmas-tree': useRef(null), @@ -104,11 +104,11 @@ function Settings() { useEffect(() => { if (useTarkovTracker) { for (const stationKey in allStations) { - if (!refs[stationKey]) { + if (!stationRefs[stationKey]) { continue; } - refs[stationKey].current?.setValue({ + stationRefs[stationKey].current?.setValue({ value: allStations[stationKey], label: allStations[stationKey] ? allStations[stationKey].toString() @@ -230,13 +230,13 @@ function Settings() {