tidy up code

This commit is contained in:
Michael Telatynski 2021-04-26 16:11:07 +01:00
parent a8711dcce9
commit 43b43dc685
2 changed files with 5 additions and 3 deletions

View file

@ -397,6 +397,10 @@ export const SpaceHierarchy: React.FC<IHierarchyProps> = ({
const [removing, setRemoving] = useState(false);
const [saving, setSaving] = useState(false);
if (summaryError) {
return <p>{_t("Your server does not support showing space hierarchies.")}</p>;
}
let content;
if (roomsMap) {
const numRooms = Array.from(roomsMap.values()).filter(r => r.room_type !== RoomType.Space).length;
@ -538,8 +542,6 @@ export const SpaceHierarchy: React.FC<IHierarchyProps> = ({
{ children }
</AutoHideScrollbar>
</>;
} else if (summaryError) {
content = <p>{_t("Your server does not support showing space hierarchies.")}</p>;
} else {
content = <Spinner />;
}