wrap lobby add space room in callback hook

This commit is contained in:
Ajay Bura 2024-05-31 14:37:37 +05:30
parent b7d700ffc6
commit 81c47f631e

View file

@ -325,7 +325,10 @@ export function Lobby() {
)
);
const addSpaceRoom = (roomId: string) => setSpaceRooms({ type: 'PUT', roomId });
const addSpaceRoom = useCallback(
(roomId: string) => setSpaceRooms({ type: 'PUT', roomId }),
[setSpaceRooms]
);
const handleCategoryClick = useCategoryHandler(setClosedCategories, (categoryId) =>
closedCategories.has(categoryId)