* optimize room typing members hook * remove unused code - WIP * remove old code from initMatrix * remove twemojify function * remove old sanitize util * delete old markdown util * delete Math atom component * uninstall unused dependencies * remove old notification system * decrypt message in inbox notification center and fix refresh in background * improve notification --------- Co-authored-by: Krishan <33421343+kfiven@users.noreply.github.com>
48 lines
1.2 KiB
JavaScript
48 lines
1.2 KiB
JavaScript
import React, { useState, useEffect } from 'react';
|
|
|
|
import cons from '../../../client/state/cons';
|
|
import navigation from '../../../client/state/navigation';
|
|
|
|
import InviteUser from '../invite-user/InviteUser';
|
|
import Settings from '../settings/Settings';
|
|
import SpaceSettings from '../space-settings/SpaceSettings';
|
|
import RoomSettings from '../room/RoomSettings';
|
|
|
|
function Windows() {
|
|
const [inviteUser, changeInviteUser] = useState({
|
|
isOpen: false,
|
|
roomId: undefined,
|
|
term: undefined,
|
|
});
|
|
|
|
function openInviteUser(roomId, searchTerm) {
|
|
changeInviteUser({
|
|
isOpen: true,
|
|
roomId,
|
|
searchTerm,
|
|
});
|
|
}
|
|
|
|
useEffect(() => {
|
|
navigation.on(cons.events.navigation.INVITE_USER_OPENED, openInviteUser);
|
|
return () => {
|
|
navigation.removeListener(cons.events.navigation.INVITE_USER_OPENED, openInviteUser);
|
|
};
|
|
}, []);
|
|
|
|
return (
|
|
<>
|
|
<InviteUser
|
|
isOpen={inviteUser.isOpen}
|
|
roomId={inviteUser.roomId}
|
|
searchTerm={inviteUser.searchTerm}
|
|
onRequestClose={() => changeInviteUser({ isOpen: false, roomId: undefined })}
|
|
/>
|
|
<Settings />
|
|
<SpaceSettings />
|
|
<RoomSettings />
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default Windows;
|