mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-18 05:00:29 +03:00
Add ability to explore and join space rooms
Signed-off-by: ajbura <ajbura@gmail.com>
This commit is contained in:
parent
a55f1df17f
commit
1f6e5e71ef
8 changed files with 538 additions and 7 deletions
|
|
@ -100,8 +100,8 @@ function useWindowToggle(setSelectedTab) {
|
|||
const [window, setWindow] = useState(null);
|
||||
|
||||
useEffect(() => {
|
||||
const openSpaceSettings = (spaceId, tab) => {
|
||||
setWindow({ spaceId, tabText });
|
||||
const openSpaceSettings = (roomId, tab) => {
|
||||
setWindow({ roomId, tabText });
|
||||
const tabItem = tabItems.find((item) => item.text === tab);
|
||||
if (tabItem) setSelectedTab(tabItem);
|
||||
};
|
||||
|
|
@ -120,7 +120,7 @@ function SpaceSettings() {
|
|||
const [selectedTab, setSelectedTab] = useState(tabItems[0]);
|
||||
const [window, requestClose] = useWindowToggle(setSelectedTab);
|
||||
const isOpen = window !== null;
|
||||
const roomId = window?.spaceId;
|
||||
const roomId = window?.roomId;
|
||||
|
||||
const mx = initMatrix.matrixClient;
|
||||
const room = mx.getRoom(roomId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue