parent df92c378e7
commit 51e03d5dbe

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

Loading…
Cancel
Save