aboutsummaryrefslogtreecommitdiff
path: root/modern/src/MainPage.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/MainPage.js')
-rw-r--r--modern/src/MainPage.js7
1 files changed, 1 insertions, 6 deletions
diff --git a/modern/src/MainPage.js b/modern/src/MainPage.js
index 4a266328..b20c1264 100644
--- a/modern/src/MainPage.js
+++ b/modern/src/MainPage.js
@@ -1,5 +1,4 @@
import React, { useState, useEffect } from 'react';
-import { useDispatch } from 'react-redux';
import { useHistory } from 'react-router-dom';
import {
makeStyles, Paper, Toolbar, TextField, IconButton, Button,
@@ -23,7 +22,6 @@ import BottomMenu from './components/BottomMenu';
import { useTranslation } from './LocalizationProvider';
import PoiMap from './map/PoiMap';
import MapPadding from './map/MapPadding';
-import { devicesActions } from './store';
const useStyles = makeStyles((theme) => ({
root: {
@@ -95,7 +93,6 @@ const MainPage = () => {
const classes = useStyles();
const history = useHistory();
const theme = useTheme();
- const dispatch = useDispatch();
const t = useTranslation();
const isTablet = useMediaQuery(theme.breakpoints.down('md'));
@@ -108,8 +105,6 @@ const MainPage = () => {
setCollapsed(!collapsed);
};
- useEffect(() => dispatch(devicesActions.filterByName(deviceName.trim())), [deviceName]);
-
useEffect(() => setCollapsed(isTablet), [isTablet]);
return (
@@ -163,7 +158,7 @@ const MainPage = () => {
</Toolbar>
</Paper>
<div className={classes.deviceList}>
- <DevicesList />
+ <DevicesList filter={deviceName} />
</div>
</Paper>
<BottomMenu />