Skip to content

Commit

Permalink
Solve the user synchronization problem
Browse files Browse the repository at this point in the history
  • Loading branch information
xdzqyyds committed Dec 6, 2024
1 parent b5dcd8a commit 305eee4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webapp/components/login/window.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState, useEffect } from 'react'
import { getInvitation } from '../../lib/api'
import { getInvitation, setRoomId } from '../../lib/api'
import { setStorageMeeting } from '../../lib/storage'
import { useAtom } from 'jotai'
import { locationAtom, meetingIdAtom } from '../../store/atom'
Expand Down Expand Up @@ -41,6 +41,7 @@ export default function InviteWindow({ inviteeId }: InviteWindowProps) {
const roomId = invitationValue.split(' ')[0]
setStorageMeeting(roomId)
setAtomMeetingId(roomId)
setRoomId(roomId) // 添加这一行,设置全局roomId
setLoc(prev => ({ ...prev, pathname: `/${roomId}` }))
setIsOpen(false)
}
Expand Down

0 comments on commit 305eee4

Please sign in to comment.