import React from 'react'; import { Accordion, AccordionSummary, AccordionDetails, makeStyles, Typography, Container, FormControl, InputLabel, Select, MenuItem, Checkbox, FormControlLabel, } from '@material-ui/core'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; import { useLocalization, useTranslation } from '../LocalizationProvider'; import OptionsLayout from './OptionsLayout'; import usePersistedState from '../common/usePersistedState'; const useStyles = makeStyles((theme) => ({ container: { marginTop: theme.spacing(2), }, details: { flexDirection: 'column', }, })); const PreferencesPage = () => { const classes = useStyles(); const t = useTranslation(); const { languages, language, setLanguage } = useLocalization(); const languageList = Object.entries(languages).map((values) => ({ code: values[0], name: values[1].name })); const [mapLiveRoutes, setMapLiveRoutes] = usePersistedState('mapLiveRoutes', false); const [mapFollow, setMapFollow] = usePersistedState('mapFollow', false); return ( }> {t('sharedPreferences')} {t('loginLanguage')} }> {t('mapTitle')} setMapLiveRoutes(event.target.checked)} />} label={t('mapLiveRoutes')} /> setMapFollow(event.target.checked)} />} label={t('deviceFollow')} /> ); }; export default PreferencesPage;