(null)
useEffect(() => {
const unsubscribe = syncProgressManager.subscribe((newProgress) => {
setProgress(newProgress)
})
// Check current progress immediately
const currentProgress = syncProgressManager.getProgress()
if (currentProgress) {
setProgress(currentProgress)
}
return () => {
unsubscribe()
}
}, [])
// Show indicator if we have progress and it's not completed
if (!progress) {
return null
}
// Always show indicator during sync, even if completed is false (means sync is in progress)
if (progress.completed) {
return null
}
const relayName = progress.currentRelay ? getRelayDisplayName(progress.currentRelay) : null
return (
{relayName ? (
{relayName}
) : (
{t('settings.sync.connecting')}
)}
)
}
/**
* Global sync progress bar (deprecated - kept for backward compatibility)
* @deprecated Use SyncStatus component in KeyManagementManager instead
*/
export function GlobalSyncProgressBar(): React.ReactElement | null {
return null
}