Apply the auto-fixable lint rules and the formatter, and drop the Vite build artifacts.
This commit is contained in:
@@ -67,7 +67,7 @@ export const SpaceHierarchy = forwardRef<HTMLDivElement, SpaceHierarchyProps>(
|
||||
onOpenRoom,
|
||||
onSpacesFound,
|
||||
},
|
||||
ref
|
||||
ref,
|
||||
) => {
|
||||
const mx = useMatrixClient();
|
||||
|
||||
@@ -132,7 +132,9 @@ export const SpaceHierarchy = forwardRef<HTMLDivElement, SpaceHierarchyProps>(
|
||||
return parentToSubRooms;
|
||||
}, [mx, roomItems]);
|
||||
|
||||
let childItems = roomItems?.filter((i) => !subspaces.has(i.roomId) && !globalSubRoomIds.has(i.roomId));
|
||||
let childItems = roomItems?.filter(
|
||||
(i) => !subspaces.has(i.roomId) && !globalSubRoomIds.has(i.roomId),
|
||||
);
|
||||
// Only hide when we know the user cannot edit children. If power levels are
|
||||
// still loading (spacePermissions undefined), keep inaccessible rows visible
|
||||
// so admins can clean them up.
|
||||
@@ -196,7 +198,8 @@ export const SpaceHierarchy = forwardRef<HTMLDivElement, SpaceHierarchyProps>(
|
||||
{childItems && childItems.length > 0 ? (
|
||||
<Box direction="Column" gap="100">
|
||||
{childItems.map((roomItem, index) => {
|
||||
const roomSummary = rooms.get(roomItem.roomId) ?? hierarchySummaries.get(roomItem.roomId);
|
||||
const roomSummary =
|
||||
rooms.get(roomItem.roomId) ?? hierarchySummaries.get(roomItem.roomId);
|
||||
|
||||
const roomPowerLevels = roomsPowerLevels.get(roomItem.roomId) ?? {};
|
||||
|
||||
@@ -249,7 +252,8 @@ export const SpaceHierarchy = forwardRef<HTMLDivElement, SpaceHierarchyProps>(
|
||||
<Box direction="Column" gap="100" style={{ marginLeft: config.space.S400 }}>
|
||||
{subRoomIds.map((subRoomId) => {
|
||||
const subRoom = mx.getRoom(subRoomId);
|
||||
const subRoomSummary = rooms.get(subRoomId) ?? hierarchySummaries.get(subRoomId);
|
||||
const subRoomSummary =
|
||||
rooms.get(subRoomId) ?? hierarchySummaries.get(subRoomId);
|
||||
const subRoomPowerLevels = roomsPowerLevels.get(subRoomId) ?? {};
|
||||
const subRoomItem: HierarchyItemRoom = {
|
||||
roomId: subRoomId,
|
||||
@@ -318,5 +322,5 @@ export const SpaceHierarchy = forwardRef<HTMLDivElement, SpaceHierarchyProps>(
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user