small changes
This commit is contained in:
parent
1aa7914289
commit
d620dc7d5e
|
@ -1,20 +1,16 @@
|
|||
import { Provider } from 'jotai'
|
||||
import { useState } from 'react'
|
||||
import './App.css'
|
||||
import Meeting from './components/meeting/Meeting'
|
||||
import Sidebar from './components/sidebar/Sidebar'
|
||||
import useBackendData from './hooks/useBackendData'
|
||||
import useConferenceData from './hooks/useConferenceData'
|
||||
import useLocalUser from './hooks/useLocalUser'
|
||||
import { useRoomName } from './hooks/useRoomName'
|
||||
|
||||
function App() {
|
||||
const { userInfo, setUserInfo } = useLocalUser()
|
||||
const { roomData, sendMessage } = useBackendData(userInfo)
|
||||
const { conferenceData, setConferenceData } = useConferenceData(sendMessage, setUserInfo)
|
||||
const [meetingStarted, setMeetingStarted] = useState(false)
|
||||
|
||||
console.log(roomData)
|
||||
console.log('[App] [Room Data]', roomData)
|
||||
|
||||
if (roomData && userInfo) {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import { useCallback, useState } from 'react'
|
||||
import { ConferenceData } from '../../background/jitsi/eventListeners'
|
||||
import useMeetingStarted from '../../hooks/useMeetingStarted'
|
||||
import { useRoomName } from '../../hooks/useRoomName'
|
||||
|
@ -13,7 +12,7 @@ interface Props {
|
|||
}
|
||||
|
||||
function Meeting({ conferenceData, setConferenceData, userInfo }: Props) {
|
||||
const [meetingStarted, setMeetingStarted] = useMeetingStarted()
|
||||
const [meetingStarted] = useMeetingStarted()
|
||||
const { roomName } = useRoomName()
|
||||
|
||||
if (meetingStarted) {
|
||||
|
|
|
@ -6,11 +6,10 @@ import useWebSocketConnection from './useWebSocketConnection'
|
|||
|
||||
function useBackendData(userInfo: UserInfo) {
|
||||
console.log('[Rooms] useBackendData')
|
||||
|
||||
const { onMessage, sendMessage, disconnect } = useWebSocketConnection(userInfo)
|
||||
|
||||
const { roomData, setRoomData } = useRoomData()
|
||||
|
||||
const { chatMesages, addChatMessage } = useAllChat()
|
||||
const { addChatMessage } = useAllChat()
|
||||
|
||||
useEffect(() => {
|
||||
onMessage((messageString) => {
|
||||
|
|
Loading…
Reference in New Issue