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} />
|
|
|
|
<Meeting setConferenceData={setConferenceData} userInfo={userInfo} />
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
return <h2>🌀 Loading...</h2>;
|
2023-01-07 16:15:35 +01:00
|
|
|
}
|
|
|
|
|
2023-01-07 19:06:04 +01:00
|
|
|
export default App;
|