Skip to content

Conversation

@jackburrus
Copy link
Contributor

@jackburrus jackburrus commented Oct 18, 2023

Refactors openlp table to use react-table:
image

@vercel
Copy link

vercel bot commented Oct 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hyperdrive-fixed-borrow ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 18, 2023 11:22pm
hyperdrive-monorepo-hyperdrive-trading ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 18, 2023 11:22pm
hyperdrive-sdk-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 18, 2023 11:22pm
trading-competition ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 18, 2023 11:22pm

})}
</tbody>
</table>
{!lpShares || !withdrawalShares ? <NonIdealState /> : null}
Copy link
Contributor

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"}
Copy link
Contributor

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,
Copy link
Contributor

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} />;
Copy link
Contributor

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?

Copy link
Contributor Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants