forked from Shiloh/remnantchat
fix: display correct number of current peers
This commit is contained in:
parent
88a285778c
commit
5e24d5f1d3
@ -40,8 +40,9 @@ export function useRoom(
|
||||
() => new PeerRoom({ password: password ?? roomId, ...roomConfig }, roomId)
|
||||
)
|
||||
|
||||
const [numberOfPeers, setNumberOfPeers] = useState(1) // Includes this peer
|
||||
const {
|
||||
numberOfPeers,
|
||||
setNumberOfPeers,
|
||||
setDoShowPeers,
|
||||
peerList,
|
||||
setPeerList,
|
||||
@ -207,7 +208,6 @@ export function useRoom(
|
||||
|
||||
const newNumberOfPeers = numberOfPeers + 1
|
||||
setNumberOfPeers(newNumberOfPeers)
|
||||
setNumberOfPeers(newNumberOfPeers)
|
||||
;(async () => {
|
||||
try {
|
||||
const promises: Promise<any>[] = [sendPeerId(userId, peerId)]
|
||||
|
Loading…
Reference in New Issue
Block a user