jitsi-roomsv2/frontend/src/App.tsx

40 lines
1.1 KiB
TypeScript
Raw Normal View History

2023-04-08 15:58:11 +02:00
import { Provider } from "jotai";
2023-04-07 16:21:15 +02:00
import { useState } from "react";
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-04-07 16:21:15 +02:00
import { useRoomName } from "./hooks/useRoomName";
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-04-07 16:21:15 +02:00
const [meetingStarted, setMeetingStarted] = useState(false);
2023-02-07 20:31:07 +01:00
console.log(roomData);
if (roomData && userInfo) {
return (
<div className="App">
2023-04-07 16:21:15 +02:00
<Sidebar usersData={roomData}
2023-04-08 15:58:11 +02:00
sendMessage={sendMessage}
2023-04-07 16:21:15 +02:00
/>
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;