-
Notifications
You must be signed in to change notification settings - Fork 4
Refactor open lp table #448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| })} | ||
| </tbody> | ||
| </table> | ||
| {!lpShares || !withdrawalShares ? <NonIdealState /> : null} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be &&, no? If they're both missing then show non ideal state?
| const lpShares = getValue(); | ||
| return ( | ||
| <span key="type" className="font-semibold uppercase"> | ||
| {lpShares ? "LP" : "Pending withdrawal"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this from "Pending withdrawal" to "Withdrawal shares" to also knock out one of the items under LP in the feedback checklist #446 😎
| <span> | ||
| {formatBalance({ | ||
| balance: row.original.withdrawalShares || 0n, | ||
| decimals: hyperdrive.baseToken.decimals, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's take this to 4 places as well and check off another item under LP in #446
| id: "value", | ||
| header: "Value", | ||
| cell: ({ row }) => { | ||
| return <ValueCell key="value_1" hyperdrive={hyperdrive} row={row} />; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the key do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah forgot to remove it here. Key is moved to id, so react table knows how to differentiate rows. Good catch!
Refactors openlp table to use react-table:
