|
|
|
@ -11,9 +11,13 @@ export const AdminPage = ({ roomId }: { roomId: string }) => {
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
const url = new URL(location.href)
|
|
|
|
|
setPassword(url.searchParams.get('password'))
|
|
|
|
|
url.searchParams.delete('password')
|
|
|
|
|
history.replaceState({}, '', url.toString())
|
|
|
|
|
if (url.searchParams.has('password')) {
|
|
|
|
|
setPassword(url.searchParams.get('password'))
|
|
|
|
|
|
|
|
|
|
// remove password from url
|
|
|
|
|
url.searchParams.delete('password')
|
|
|
|
|
history.replaceState({}, '', url.toString())
|
|
|
|
|
}
|
|
|
|
|
}, [])
|
|
|
|
|
|
|
|
|
|
const listeners = useRef<Record<string, (teamQuestion: { team: string; question: string }) => void>>({})
|
|
|
|
|