aboutsummaryrefslogtreecommitdiff
path: root/modern/src/reports
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-04-17 13:33:27 -0700
committerAnton Tananaev <anton@traccar.org>2022-04-17 13:33:27 -0700
commit6505a13e0037d5de5737e940907cc62c4a9107bc (patch)
treec4b4ceeb0a8b4bd7b688ca4c6f1fd59834cc9f6f /modern/src/reports
parente470eeb4fcc923bc54968a6561f66c75dab288b9 (diff)
downloadtrackermap-web-6505a13e0037d5de5737e940907cc62c4a9107bc.tar.gz
trackermap-web-6505a13e0037d5de5737e940907cc62c4a9107bc.tar.bz2
trackermap-web-6505a13e0037d5de5737e940907cc62c4a9107bc.zip
Refactor settings layout
Diffstat (limited to 'modern/src/reports')
-rw-r--r--modern/src/reports/ReportFilter.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/modern/src/reports/ReportFilter.js b/modern/src/reports/ReportFilter.js
index bfd8a540..827b36fb 100644
--- a/modern/src/reports/ReportFilter.js
+++ b/modern/src/reports/ReportFilter.js
@@ -9,7 +9,7 @@ import { useTranslation } from '../LocalizationProvider';
const ReportFilter = ({ children, handleSubmit, showOnly }) => {
const t = useTranslation();
- const devices = useSelector((state) => Object.values(state.devices.items));
+ const devices = useSelector((state) => state.devices.items);
const [deviceId, setDeviceId] = useState();
const [period, setPeriod] = useState('today');
const [from, setFrom] = useState(moment().subtract(1, 'hour'));
@@ -65,7 +65,7 @@ const ReportFilter = ({ children, handleSubmit, showOnly }) => {
<FormControl variant="filled" fullWidth>
<InputLabel>{t('reportDevice')}</InputLabel>
<Select value={deviceId} onChange={(e) => setDeviceId(e.target.value)}>
- {devices.map((device) => (
+ {Object.values(devices).map((device) => (
<MenuItem key={device.id} value={device.id}>{device.name}</MenuItem>
))}
</Select>