diff options
author | Lucas Leite <lbl.lucasleite@gmail.com> | 2022-02-08 15:58:45 -0300 |
---|---|---|
committer | Lucas Leite <lbl.lucasleite@gmail.com> | 2022-02-08 15:58:45 -0300 |
commit | 2c004026680cc9b5c1e35d7f7dd4752e56dd7dab (patch) | |
tree | bbc0f6fc08f703b80de7296c0917d52ff0566aea | |
parent | 784a2e8194c08349293a7bae9a3b96473301dd01 (diff) | |
download | trackermap-web-2c004026680cc9b5c1e35d7f7dd4752e56dd7dab.tar.gz trackermap-web-2c004026680cc9b5c1e35d7f7dd4752e56dd7dab.tar.bz2 trackermap-web-2c004026680cc9b5c1e35d7f7dd4752e56dd7dab.zip |
Fix lint problems
-rw-r--r-- | modern/src/DevicesList.js | 2 | ||||
-rw-r--r-- | modern/src/store/devices.js | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/modern/src/DevicesList.js b/modern/src/DevicesList.js index f5482252..f98e5c72 100644 --- a/modern/src/DevicesList.js +++ b/modern/src/DevicesList.js @@ -135,7 +135,7 @@ const DeviceView = ({ updateTimestamp, onMenuClick }) => { const filteredItems = useSelector(getFilteredDevices); - const getItems = () => filteredItems.length == 0 ? items : filteredItems; + const getItems = () => (filteredItems.length === 0 ? items : filteredItems); if (listInnerEl.current) { listInnerEl.current.className = classes.listInner; diff --git a/modern/src/store/devices.js b/modern/src/store/devices.js index ab4ca9ee..cfe8f162 100644 --- a/modern/src/store/devices.js +++ b/modern/src/store/devices.js @@ -24,11 +24,11 @@ const { reducer, actions } = createSlice({ filterByName(state, action) { return { ...state, - filteredItems: action.payload ? - Object.values(state.items).filter((item) => item.name?.toLowerCase().includes(action.payload?.toLowerCase())) + filteredItems: action.payload + ? Object.values(state.items).filter((item) => item.name?.toLowerCase().includes(action.payload?.toLowerCase())) : state.items, - } - } + }; + }, }, }); |