mirror of
https://github.com/SableClient/Sable.git
synced 2026-12-05 08:12:22 -08:00
fix lint and adjust lobby virtualizer estimates
This commit is contained in:
1 parent
f7552a433d
commit
87e1841e4d
2 files changed
+4
-2
No files matched your search
@@ -302,8 +302,8 @@ export function Lobby() {
|
||||
const virtualizer = useVirtualizer({
|
||||
count: hierarchy.length,
|
||||
getScrollElement: () => scrollRef.current,
|
||||
estimateSize: () => 1,
|
||||
overscan: 2,
|
||||
estimateSize: () => 72,
|
||||
overscan: 6,
|
||||
paddingStart: heroSectionHeight ?? 258,
|
||||
});
|
||||
const vItems = virtualizer.getVirtualItems();
|
||||
|
||||
@@ -175,6 +175,7 @@ export const useSpaceHierarchy = (
|
||||
const [hierarchyKey, setHierarchyKey] = useState(0);
|
||||
|
||||
const hierarchy = useMemo(
|
||||
// oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps
|
||||
() => getSpaceHierarchy(spaceId, spaceRooms, getRoom, excludeRoom, closedCategory),
|
||||
[spaceId, spaceRooms, getRoom, closedCategory, excludeRoom, hierarchyKey]
|
||||
);
|
||||
@@ -302,6 +303,7 @@ export const useSpaceJoinedHierarchy = (
|
||||
const [hierarchyKey, setHierarchyKey] = useState(0);
|
||||
|
||||
const hierarchy = useMemo(
|
||||
// oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps
|
||||
() => getSpaceJoinedHierarchy(spaceId, getRoom, excludeRoom, sortRoomItems),
|
||||
[spaceId, getRoom, excludeRoom, sortRoomItems, hierarchyKey]
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user