-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Flexible network selector in the mana calculator * feat: Improved user flow for the Mana calculator * typo * chore: Refactor the Mana Calculator * ✨ * clean up * clean up * feat: Add user total holding input * feat: Mana accumulation graph * feat: Block issuance rate graph * clean up * network params * clean up * clean up * fmt * prettify * typo * fix * fix * fix * improve graph * tweak * enhancement * Update src/components/ManaCalculator/hooks/useManaState.ts Co-authored-by: Dr-Electron <[email protected]> * Update src/components/ManaCalculator/hooks/useManaState.ts Co-authored-by: Dr-Electron <[email protected]> * fmt * clean up * fmt * feat: UI Polish * ui polish * Add humanizer config * clean up styles * Update src/components/ManaCalculator/components/AdvancedSettingsValidator.tsx Co-authored-by: Dr-Electron <[email protected]> * fixes * clean up --------- Co-authored-by: Begoña Alvarez <[email protected]> Co-authored-by: Dr-Electron <[email protected]>
- Loading branch information
1 parent
daed1df
commit e73ce44
Showing
15 changed files
with
293 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
|
||
export function chartTooltip( | ||
xLabel: string, | ||
yLabel: string, | ||
formatter: (value: number) => string = (v) => v.toString(), | ||
) { | ||
return ({ active, payload, label }) => { | ||
Check failure on line 8 in src/components/ManaCalculator/components/CharTooltip.tsx GitHub Actions / consistency
Check failure on line 8 in src/components/ManaCalculator/components/CharTooltip.tsx GitHub Actions / consistency
Check failure on line 8 in src/components/ManaCalculator/components/CharTooltip.tsx GitHub Actions / consistency
|
||
if (active && payload && payload.length) { | ||
const value = formatter(payload[0].value); | ||
return ( | ||
<div className='mana-calculator__tooltip'> | ||
<p>{`${xLabel}: ${label}`}</p> | ||
<p>{`${yLabel}: ${value}`}</p> | ||
</div> | ||
); | ||
} | ||
|
||
return null; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.