Skip to content

Commit 7d0cc67

Browse files
committed
feat(neuron-ui): add hint for synchronization not started.
1 parent aba7ee5 commit 7d0cc67

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

packages/neuron-ui/src/containers/Footer/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ export const SyncStatus = ({
3131
return <Text variant="xSmall">{t('footer.fail-to-fetch-tip-block-number')}</Text>
3232
}
3333

34+
if (+syncedBlockNumber < 0) {
35+
return <Text variant="xSmall">{t('footer.sync-not-start')}</Text>
36+
}
37+
3438
const percentage = +syncedBlockNumber / +tipBlockNumber
3539

3640
return +syncedBlockNumber + bufferBlockNumber < +tipBlockNumber ? (

packages/neuron-ui/src/locales/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@
228228
"save": "Save image"
229229
},
230230
"footer": {
231-
"fail-to-fetch-tip-block-number": "Cannot fetch tip block number"
231+
"fail-to-fetch-tip-block-number": "Cannot fetch tip block number",
232+
"sync-not-start": "Synchronization not started yet"
232233
},
233234
"common": {
234235
"or": "or",

packages/neuron-ui/src/locales/zh.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@
228228
"save": "保存图片"
229229
},
230230
"footer": {
231-
"fail-to-fetch-tip-block-number": "无法获取最新高度"
231+
"fail-to-fetch-tip-block-number": "无法获取最新高度",
232+
"sync-not-start": "同步尚未开始"
232233
},
233234
"common": {
234235
"or": "",

0 commit comments

Comments
 (0)