diff --git a/src/components/navigator/views/room-settings/views/NavigatorRoomSettingsAccessTabView.tsx b/src/components/navigator/views/room-settings/views/NavigatorRoomSettingsAccessTabView.tsx index 7df8020d..b6d2aab4 100644 --- a/src/components/navigator/views/room-settings/views/NavigatorRoomSettingsAccessTabView.tsx +++ b/src/components/navigator/views/room-settings/views/NavigatorRoomSettingsAccessTabView.tsx @@ -1,3 +1,4 @@ +import { RoomDataParser } from '@nitrots/nitro-renderer'; import { FC, useCallback } from 'react'; import { LocalizeText } from '../../../../../api'; import { Column, Flex, Text } from '../../../../../common'; @@ -33,22 +34,22 @@ export const NavigatorRoomSettingsAccessTabView: FC { LocalizeText('navigator.roomsettings.doormode') } - handleChange('lock_state', 0) } /> + handleChange('lock_state', RoomDataParser.OPEN_STATE) } /> { LocalizeText('navigator.roomsettings.doormode.open') } - handleChange('lock_state', 1) } /> + handleChange('lock_state', RoomDataParser.DOORBELL_STATE) } /> { LocalizeText('navigator.roomsettings.doormode.doorbell') } - handleChange('lock_state', 2) } /> + handleChange('lock_state', RoomDataParser.INVISIBLE_STATE) } /> { LocalizeText('navigator.roomsettings.doormode.invisible') } - handleChange('lock_state', 3) } /> - { (roomSettingsData.lockState !== 3) && + handleChange('lock_state', RoomDataParser.PASSWORD_STATE) } /> + { (roomSettingsData.lockState !== RoomDataParser.PASSWORD_STATE) && { LocalizeText('navigator.roomsettings.doormode.password') } } - { (roomSettingsData.lockState === 3) && + { (roomSettingsData.lockState === RoomDataParser.PASSWORD_STATE) && { LocalizeText('navigator.roomsettings.doormode.password') } handleChange('password', e.target.value) } onBlur={ trySave } placeholder={ LocalizeText('navigator.roomsettings.password') } />