Skip to content

Commit 4cdd974

Browse files
committed
improve messaging
1 parent 6e04514 commit 4cdd974

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

web/src/components/PendingProjects/PendingProjects.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ function PendingProjects({
6060
}
6161
const syncingProjectsCount = pendingCellIds.filter((cellId) => {
6262
const projectInfo = projectStatusInfos[cellId]
63-
return projectInfo.hasPeers
63+
return projectInfo.hasPeers && projectInfo.isGossiping
6464
}).length
6565
const waitingProjectsCount = pendingCellIds.filter((cellId) => {
6666
const projectInfo = projectStatusInfos[cellId]
67-
return !projectInfo.hasPeers
67+
return !projectInfo.hasPeers || !projectInfo.isGossiping
6868
}).length
6969

7070
const cancelProjectJoin = async (appId: string, cellId: string) => {
@@ -133,11 +133,16 @@ function PendingProjects({
133133
<div className="pending-project-phrase">
134134
{pendingProject.passphrase}
135135
</div>
136-
{pendingProject.hasPeers && (
136+
{pendingProject.hasPeers && pendingProject.isGossiping && (
137137
<div className="pending-project-status-label peer-found">
138138
syncing with found peer
139139
</div>
140140
)}
141+
{pendingProject.hasPeers && !pendingProject.isGossiping && (
142+
<div className="pending-project-status-label peer-not-found">
143+
peer found, not syncing
144+
</div>
145+
)}
141146
{!pendingProject.hasPeers && (
142147
<div className="pending-project-status-label peer-not-found">
143148
no peers found

0 commit comments

Comments
 (0)