mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-09-20 16:08:51 +03:00
fixed undefined sync state
This commit is contained in:
parent
f870e5ac8b
commit
9eebd1f4ad
@ -11,9 +11,9 @@ const StyledWarning = styled.span`
|
||||
`;
|
||||
|
||||
function getData(state) {
|
||||
if (state.sync && state.sync.sync_mode) {
|
||||
const progress = state.sync.sync_progress_height;
|
||||
const tip = state.sync.sync_tip_height;
|
||||
if (state?.sync && state?.sync?.sync_mode) {
|
||||
const progress = state?.sync?.sync_progress_height;
|
||||
const tip = state?.sync?.sync_tip_height;
|
||||
return {
|
||||
value: (
|
||||
<StyledWarning>
|
||||
@ -31,7 +31,7 @@ function getData(state) {
|
||||
</Trans>
|
||||
),
|
||||
};
|
||||
} else if (!state.sync.synced) {
|
||||
} else if (!state?.sync?.synced) {
|
||||
return {
|
||||
value: <Trans>Not Synced</Trans>,
|
||||
color: 'error',
|
||||
|
Loading…
Reference in New Issue
Block a user