Skip to content

Commit

Permalink
hook up syncing indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
Connoropolous committed Oct 16, 2023
1 parent 52baf7e commit 6e04514
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web/src/hooks/useProjectStatusInfos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,19 @@ const getNewInfos = async (

// time to check network info
let hasPeers = false
let isGossiping = false
const networkInfo = networkInfos[index]
if (networkInfo) {
// 1 means 'only me'
// 2 or more means currently active peers
hasPeers = networkInfo.current_number_of_peers > 1
isGossiping = networkInfo.fetch_pool_info.num_ops_to_fetch > 0
}
newInfos[cellId] = {
passphrase: uidToPassphrase(networkSeed),
appId,
hasPeers,
isGossiping: true,
isGossiping,
hasProjectMeta,
}
})
Expand Down

0 comments on commit 6e04514

Please sign in to comment.