diff --git a/src/components/navigator/views/creator/NavigatorRoomCreatorView.tsx b/src/components/navigator/views/creator/NavigatorRoomCreatorView.tsx index 6b76f0ac..0640cf9d 100644 --- a/src/components/navigator/views/creator/NavigatorRoomCreatorView.tsx +++ b/src/components/navigator/views/creator/NavigatorRoomCreatorView.tsx @@ -21,11 +21,9 @@ export const NavigatorRoomCreatorView: FC<{}> = props => const getRoomModelImage = (name: string) => GetConfiguration('images.url') + `/navigator/models/model_${ name }.png`; - const selectModel = (model: IRoomModel, index) => + const selectModel = (model: IRoomModel, index: number) => { - if(!model) return; - - if(model.clubLevel > GetClubMemberLevel()) return; + if(!model || (model.clubLevel > GetClubMemberLevel())) return; setSelectedModelName(RoomModels[index].name); } @@ -53,7 +51,7 @@ export const NavigatorRoomCreatorView: FC<{}> = props => useEffect(() => { - if(categories) setCategory(categories[0].id); + if(categories && categories.length) setCategory(categories[0].id); }, [ categories ]); return ( @@ -62,12 +60,16 @@ export const NavigatorRoomCreatorView: FC<{}> = props => { LocalizeText('navigator.createroom.roomnameinfo') } - setName(event.target.value) } /> + setName(event.target.value) } /> + + + { LocalizeText('navigator.createroom.roomdescinfo') } +