jitsi-roomsv2/frontend/src/App.tsx

34 lines
891 B
TypeScript
Raw Normal View History

2023-01-07 19:06:04 +01:00
import "./App.css";
import Meeting from "./components/meeting/Meeting";
import Sidebar from "./components/sidebar/Sidebar";
2023-02-07 20:31:07 +01:00
import useBackendData from "./hooks/useBackendData";
import useConferenceData from "./hooks/useConferenceData";
import useLocalUser from "./hooks/useLocalUser";
2023-01-07 16:15:35 +01:00
function App() {
2023-02-07 20:31:07 +01:00
const { userInfo, setUserInfo } = useLocalUser();
const { roomData, sendMessage } = useBackendData(userInfo);
const { conferenceData, setConferenceData } = useConferenceData(
sendMessage,
setUserInfo
2023-01-07 19:06:04 +01:00
);
2023-02-07 20:31:07 +01:00
console.log(roomData);
if (roomData && userInfo) {
return (
<div className="App">
<Sidebar usersData={roomData} />
2023-02-12 15:28:53 +01:00
<Meeting
conferenceData={conferenceData}
setConferenceData={setConferenceData}
userInfo={userInfo}
/>
2023-02-07 20:31:07 +01:00
</div>
);
}
return <h2>🌀 Loading...</h2>;
2023-01-07 16:15:35 +01:00
}
2023-01-07 19:06:04 +01:00
export default App;