aboutsummaryrefslogtreecommitdiff
path: root/modern/src/settings
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-05-15 16:18:01 -0700
committerAnton Tananaev <anton@traccar.org>2022-05-15 16:18:01 -0700
commit18bf43634ba99e8a77571b6bcf650f4687c6df68 (patch)
tree82eaabfffb159c729c1bdfec1a26574f9c2dce5c /modern/src/settings
parentdbf6e8127733414b1f25b6c033bfc5437801414d (diff)
downloadtrackermap-web-18bf43634ba99e8a77571b6bcf650f4687c6df68.tar.gz
trackermap-web-18bf43634ba99e8a77571b6bcf650f4687c6df68.tar.bz2
trackermap-web-18bf43634ba99e8a77571b6bcf650f4687c6df68.zip
Combine position attributes
Diffstat (limited to 'modern/src/settings')
-rw-r--r--modern/src/settings/PreferencesPage.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/modern/src/settings/PreferencesPage.js b/modern/src/settings/PreferencesPage.js
index a7ce6903..94d55adf 100644
--- a/modern/src/settings/PreferencesPage.js
+++ b/modern/src/settings/PreferencesPage.js
@@ -7,7 +7,6 @@ import { useLocalization, useTranslation } from '../common/components/Localizati
import usePersistedState from '../common/util/usePersistedState';
import PageLayout from '../common/components/PageLayout';
import SettingsMenu from './components/SettingsMenu';
-import usePositionProperties from '../common/attributes/usePositionProperties';
import usePositionAttributes from '../common/attributes/usePositionAttributes';
const useStyles = makeStyles((theme) => ({
@@ -26,9 +25,7 @@ const PreferencesPage = () => {
const { languages, language, setLanguage } = useLocalization();
const languageList = Object.entries(languages).map((values) => ({ code: values[0], name: values[1].name }));
- const positionProperties = usePositionProperties(t);
const positionAttributes = usePositionAttributes(t);
- const positionObject = { ...positionProperties, ...positionAttributes };
const [positionItems, setPositionItems] = usePersistedState('positionItems', ['speed', 'address', 'totalDistance', 'course']);
const [mapLiveRoutes, setMapLiveRoutes] = usePersistedState('mapLiveRoutes', false);
@@ -68,8 +65,8 @@ const PreferencesPage = () => {
renderValue={(it) => it.length}
multiple
>
- {Object.keys(positionObject).map((key) => (
- <MenuItem key={key} value={key}>{positionObject[key].name}</MenuItem>
+ {Object.keys(positionAttributes).map((key) => (
+ <MenuItem key={key} value={key}>{positionAttributes[key].name}</MenuItem>
))}
</Select>
</FormControl>