aboutsummaryrefslogtreecommitdiff
path: root/modern/src/MainPage.js
diff options
context:
space:
mode:
authorLucas Leite <lbl.lucasleite@gmail.com>2022-02-08 17:48:21 -0300
committerLucas Leite <lbl.lucasleite@gmail.com>2022-02-08 17:48:21 -0300
commitf35692eef0763fe853f3d88a18d6aefbbf5d0d2b (patch)
treeb7660d4ec3ef19f07edbd192eacac72ca8b3c923 /modern/src/MainPage.js
parent2c004026680cc9b5c1e35d7f7dd4752e56dd7dab (diff)
downloadtrackermap-web-f35692eef0763fe853f3d88a18d6aefbbf5d0d2b.tar.gz
trackermap-web-f35692eef0763fe853f3d88a18d6aefbbf5d0d2b.tar.bz2
trackermap-web-f35692eef0763fe853f3d88a18d6aefbbf5d0d2b.zip
Changed devices list search
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 />