Skip to content
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

Cleanup portfolio components #1658

Merged
merged 2 commits into from
Nov 18, 2024
Merged

Conversation

DannyDelott
Copy link
Contributor

Lots of duplicate code to DRY up in preparation for adding the Rewards tab content.

Copy link

changeset-bot bot commented Nov 18, 2024

⚠️ No Changeset found

Latest commit: a251ded

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Nov 18, 2024

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

Name Status Preview Comments Updated (UTC)
hyperdrive-mainnet-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 18, 2024 8:59pm
hyperdrive-sepolia-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 18, 2024 8:59pm
6 Skipped Deployments
Name Status Preview Comments Updated (UTC)
hyperdrive-js ⬜️ Ignored (Inspect) Visit Preview Nov 18, 2024 8:59pm
hyperdrive-mainnet-production ⬜️ Ignored (Inspect) Visit Preview Nov 18, 2024 8:59pm
hyperdrive-sepolia-production ⬜️ Ignored (Inspect) Visit Preview Nov 18, 2024 8:59pm
testnet-v1 ⬜️ Ignored (Inspect) Nov 18, 2024 8:59pm
testnet-v1.0.6 ⬜️ Ignored (Inspect) Visit Preview Nov 18, 2024 8:59pm
trading-competition ⬜️ Ignored (Inspect) Visit Preview Nov 18, 2024 8:59pm

Comment on lines 51 to 58
<a
className="daisy-link"
href="https://docs.hyperdrive.box/hyperdrive-overview/position-types/longs-fixed-rates"
rel="noopener noreferrer"
target="_blank"
>
documentation
</a>{" "}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use the ExternalLink component here for analytics. If you wanna tack it now, that'd be nice, but I'd also understand if this is just a mechanical PR and we want to tackle this in a later PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just move this up to the parent dir instead of wrapping single files in dirs with the same name?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and throughout where it's done.

Comment on lines 108 to 113
/*
This regex removes the term from the hyperdrive name since it's already shown in the table.
It matches:
- \d{1,3}: 1 to 3 digits
- d: Followed by the letter 'd'
*/ hyperdrive.name.replace(/\d{1,3}d/, "")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciate the explanation in the comment! For auto-generated explanations and additional context, you can use regex101.com to create a minimal example and add a link here. Here's an example: https://regex101.com/r/PLmbXb/1

readFileSync(cargoManifestPath, "utf8").replace(
// https://regex101.com/r/PLmbXb/1
/^version(\s*)=(\s*)"[^"]+"/m,
`version$1=$2"${version}"`,
),

@DannyDelott DannyDelott force-pushed the danny-cleanup-portfolio-components branch from ea89efd to a251ded Compare November 18, 2024 20:58
@DannyDelott DannyDelott merged commit 9a4e691 into main Nov 18, 2024
15 checks passed
@DannyDelott DannyDelott deleted the danny-cleanup-portfolio-components branch November 18, 2024 21:00
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