diff --git a/apps/mudita-center/package-lock.json b/apps/mudita-center/package-lock.json index e231103240..700734e003 100644 --- a/apps/mudita-center/package-lock.json +++ b/apps/mudita-center/package-lock.json @@ -1,12 +1,12 @@ { "name": "@mudita/mudita-center-app", - "version": "2.3.1-rc.1a", + "version": "2.3.1-rc.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@mudita/mudita-center-app", - "version": "2.3.1-rc.1a", + "version": "2.3.1-rc.2", "license": "GPL-3.0", "dependencies": { "serialport": "10.1.0" diff --git a/apps/mudita-center/package.json b/apps/mudita-center/package.json index 59bb66d5f3..c7ed7edc7a 100644 --- a/apps/mudita-center/package.json +++ b/apps/mudita-center/package.json @@ -1,6 +1,6 @@ { "name": "mudita-center", - "version": "2.3.1-rc.1a", + "version": "2.3.1-rc.2", "description": "Mudita Center", "main": "./dist/main.js", "productName": "Mudita Center", diff --git a/libs/core/device-select/components/device-select-drawer.component.tsx b/libs/core/device-select/components/device-select-drawer.component.tsx index 7b07b7b368..93dc51812d 100644 --- a/libs/core/device-select/components/device-select-drawer.component.tsx +++ b/libs/core/device-select/components/device-select-drawer.component.tsx @@ -32,6 +32,7 @@ import { DrawerDevice } from "Core/device-select/components/drawer-device.compon import { defineMessages } from "react-intl" import { DeviceId } from "Core/device/constants/device-id" import { ModalLayers } from "Core/modals-manager/constants/modal-layers.enum" +import { useEffect } from "react" const messages = defineMessages({ changeDevice: { id: "component.drawer.headerTitle" }, @@ -92,6 +93,12 @@ const DeviceSelectDrawer: FunctionComponent = () => { } } + useEffect(() => { + if (devices.length === 0) { + dispatch(setSelectDeviceDrawerOpen(false)) + } + }, [dispatch, devices.length]) + return (