Skip to content

Commit

Permalink
Added tooltip for missing sps
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiaMineJP committed Nov 15, 2023
1 parent f7a1afe commit 52a90c0
Showing 1 changed file with 27 additions and 14 deletions.
41 changes: 27 additions & 14 deletions packages/gui/src/components/farm/FarmHealth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -309,25 +309,38 @@ function FarmHealth() {
if (isLoadingMissingSps) {
return <CircularProgress color="secondary" size={14} />;
}

const tooltipTitle = (
<Box>
<Trans>
The increasing number of missing signage points suggests that you were either disconnected from or
significantly distant from a timelord in your fullNode network. The total number of missing SPs serves as an
indicator of potential rewards you could have claimed. A common reason for missing SPs is typically that the
fullNode is out of sync due to network issues
</Trans>
{Boolean(missingSpsData?.totalMissingSps) && (
<Button size="small" onClick={() => resetMissingSps()}>
<Trans>Reset</Trans>
</Button>
)}
</Box>
);

if (!missingSpsData?.totalMissingSps) {
return (
<Box>
<Typography variant="body2">
<Trans>Missing signage points</Trans>
</Typography>
<StateIndicator state={State.SUCCESS} indicator reversed>
<Trans>None</Trans>
</StateIndicator>
</Box>
<Tooltip title={tooltipTitle}>
<Box>
<Typography variant="body2">
<Trans>Missing signage points</Trans>
</Typography>
<StateIndicator state={State.SUCCESS} indicator reversed>
<Trans>None</Trans>
</StateIndicator>
</Box>
</Tooltip>
);
}

const tooltipTitle = (
<Button size="small" onClick={() => resetMissingSps()}>
<Trans>Reset</Trans>
</Button>
);

return (
<Tooltip title={tooltipTitle}>
<Box>
Expand Down

0 comments on commit 52a90c0

Please sign in to comment.