Fix stat summary and filter button

This commit is contained in:
Marco van Dijk 2022-06-02 00:09:56 +02:00
parent e654f47c65
commit c27c351ec8
3 changed files with 7 additions and 7 deletions

View File

@ -103,7 +103,7 @@ const MonthlyFactoids = (obj) => {
<div className="halfVerticalDivider" /> <div className="halfVerticalDivider" />
<div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: withdrawStakeColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}> <div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: withdrawStakeColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}>
<Ticket seed={obj.seed + "-neworchs-"} icon={"💸"} subtext={obj.data.withdrawStakeCount + " withdraw reward calls"} descriptions={[ <Ticket seed={obj.seed + "-neworchs-"} icon={"💸"} subtext={obj.data.withdrawStakeCount + " withdraw reward calls"} descriptions={[
obj.data.withdrawStakeAmountSum.toLocaleString({ maximumFractionDigits: 2 }) + " LPT worth of staking rewards were withdrawn to the accounts of delegators" obj.data.withdrawStakeAmountSum.toLocaleString({ maximumFractionDigits: 2 }) + " LPT worth of stake was withdrawn to the accounts of delegators"
]} /> ]} />
</div> </div>
</div> : null </div> : null

View File

@ -52,7 +52,7 @@ const MonthlyStatsSummary = (obj) => {
} }
{obj.data.withdrawStakeCount ? {obj.data.withdrawStakeCount ?
<div className="stroke" style={{ width: 'unset' }}> <div className="stroke" style={{ width: 'unset' }}>
<p>💸 {obj.data.withdrawStakeAmountSum.toLocaleString({ maximumFractionDigits: 2 })} LPT worth of staking rewards were withdrawn to the account of the delegator</p> <p>💸 {obj.data.withdrawStakeAmountSum.toLocaleString({ maximumFractionDigits: 2 })} LPT worth of stake was withdrawn to the account of delegators</p>
</div> : null </div> : null
} }
{obj.data.withdrawFeesCount ? {obj.data.withdrawFeesCount ?

View File

@ -74,7 +74,7 @@ const Stats = (obj) => {
summary += "📉 " + data.unbondCount + " delegators unbonded " + data.unbondStakeSum.toLocaleString({ maximumFractionDigits: 1 }) + " LPT \r\n"; summary += "📉 " + data.unbondCount + " delegators unbonded " + data.unbondStakeSum.toLocaleString({ maximumFractionDigits: 1 }) + " LPT \r\n";
} }
if (data.withdrawStakeCount) { if (data.withdrawStakeCount) {
summary += "💸 " + data.withdrawStakeAmountSum.toLocaleString({ maximumFractionDigits: 1 }) + " LPT worth of staking rewards were withdrawn to the accounts of delegators \r\n"; summary += "💸 " + data.withdrawStakeAmountSum.toLocaleString({ maximumFractionDigits: 1 }) + " LPT worth of stake were withdrawn to the accounts of delegators \r\n";
} }
if (data.withdrawFeesCount) { if (data.withdrawFeesCount) {
summary += "💸 " + data.withdrawFeesAmountSum.toLocaleString({ maximumFractionDigits: 3 }) + " ETH worth of transcoding fees were withdrawn to the accounts of delegators \r\n"; summary += "💸 " + data.withdrawFeesAmountSum.toLocaleString({ maximumFractionDigits: 3 }) + " ETH worth of transcoding fees were withdrawn to the accounts of delegators \r\n";
@ -156,7 +156,7 @@ const Stats = (obj) => {
} }
if (stakeList.length) { if (stakeList.length) {
summary += "\r\n(The percentage of stake only includes orchestrators who won at least 1 ticket this month)\r\n"; summary += "\r\nThe percentage of stake excludes non-transcoding orchestrators)\r\n";
} }
copyLink(summary); copyLink(summary);
@ -180,10 +180,10 @@ const Stats = (obj) => {
<h4 className="rowAlignLeft withWrap showNeverOnMobile">Statistics</h4> <h4 className="rowAlignLeft withWrap showNeverOnMobile">Statistics</h4>
</div> </div>
<div className='rowAlignRight'> <div className='rowAlignRight'>
<p>Hide non-earners</p> <p>Show non-transcoders?</p>
<div className="toggle-container" onClick={() => setShowOnlyTranscoders(!showOnlyTranscoders)}> <div className="toggle-container" onClick={() => setShowOnlyTranscoders(!showOnlyTranscoders)}>
<div className={`dialog-button ${showOnlyTranscoders ? "" : "disabled"}`}> <div className={`dialog-button ${!showOnlyTranscoders ? "" : "disabled"}`}>
{showOnlyTranscoders ? "Show" : "Hide"} {!showOnlyTranscoders ? "Show" : "Hide"}
</div> </div>
</div> </div>
</div> </div>