1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

UI improvement for low number of pool shares (#1476)

* UI iprovement for low number of pool shares

* Fixing comparison logic

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>

Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
This commit is contained in:
Jamie Hewitt 2022-05-25 15:17:44 +01:00 committed by GitHub
parent fc2aa5bf0e
commit ec7dc4fccd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,9 +53,10 @@ export default function Migration(): ReactElement {
const content = data.content.edges[0].node.childContentJson
function getNoLockedSharesMessage() {
const poolSharesRounded = isNaN(Number(poolShares))
? 0
: Number(poolShares).toFixed(3)
const poolSharesRounded =
Number(poolShares) <= 0.001
? 'less than 0.001'
: Number(poolShares).toFixed(3)
return `\n\nYou currently have ${poolSharesRounded} pool shares\n\nYou have locked 0 shares`
}
function getLockedSharesMessage(lockedShares: number) {