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

Update Swap ETH for USDC/DAI link on stablecoin page [FIXES #12873] #12874

Merged
merged 1 commit into from May 7, 2024

Conversation

barskhianfannie
Copy link
Contributor

@barskhianfannie barskhianfannie commented Apr 30, 2024

This changeset updates the Swap ETH for Dai and Swap ETH for USDC button destination URLS on the stablecoin page to a valid token page where ETH is set as the sell token, and either DAI or USDC as the buy token as the button text suggests.

PR Walkthrough of changes and issues seen in production

Description

Update the links used on this page to lead to a valid token page which has Ethereum as the sell token and USDC or DAI as the buy token.

Add target="_blank" to ensure these pages open in a separate tab allowing users to explore the external content without losing their place on the Stablecoin page..

Related Issue

FIXES #12873

@github-actions github-actions bot added content 🖋️ This involves copy additions or edits needs review 👀 Review is needed for this issue or pull request labels Apr 30, 2024
Copy link

netlify bot commented Apr 30, 2024

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 0944e9c
🔍 Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/6633b6987cc66400089d6639
😎 Deploy Preview https://deploy-preview-12874--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 50 (🟢 up 11 from production)
Accessibility: 92 (🔴 down 1 from production)
Best Practices: 95 (🔴 down 5 from production)
SEO: 95 (🔴 down 5 from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -526,7 +526,7 @@ const StablecoinsPage = ({ markets, marketsHasError }) => {
</Text>
<Flex direction="column">
<Box>
<ButtonLink mb={4} me={4} to="https://1inch.exchange">
<ButtonLink mb={4} me={4} target="_blank" href="https://matcha.xyz/tokens/ethereum/0x6b175474e89094c44da98b954eedeac495271d0f?sellChain=1&sellAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

to was giving a "deprecated" warning so I updated the usage to href.

Copy link
Contributor

Choose a reason for hiding this comment

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

@pettinarip do you remember what the nuance here was? i see our Link component accepts both

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@minimalsm Would you prefer I revert back to the original usage?

@@ -526,7 +526,7 @@ const StablecoinsPage = ({ markets, marketsHasError }) => {
</Text>
<Flex direction="column">
<Box>
<ButtonLink mb={4} me={4} to="https://1inch.exchange">
<ButtonLink mb={4} me={4} target="_blank" href="https://matcha.xyz/tokens/ethereum/0x6b175474e89094c44da98b954eedeac495271d0f?sellChain=1&sellAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee">
Copy link
Contributor

Choose a reason for hiding this comment

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

No need for this, our link component automatically adds target="_blank" to external links :)

Suggested change
<ButtonLink mb={4} me={4} target="_blank" href="https://matcha.xyz/tokens/ethereum/0x6b175474e89094c44da98b954eedeac495271d0f?sellChain=1&sellAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee">
<ButtonLink mb={4} me={4} href="https://matcha.xyz/tokens/ethereum/0x6b175474e89094c44da98b954eedeac495271d0f?sellChain=1&sellAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee">

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 yes! My apologies, removed both in the latest commit. @minimalsm

@@ -576,7 +576,8 @@ const StablecoinsPage = ({ markets, marketsHasError }) => {
<ButtonLink
mb={4}
me={4}
to="https://matcha.xyz/tokens/ethereum/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
target="_blank"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
target="_blank"

@minimalsm minimalsm added the needs grooming Needs discussion during a grooming session label May 2, 2024
Copy link
Member

@wackerow wackerow left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks @barskhianfannie! Loved the YouTube explainer of the issue too, haven't come across that before =)

And yeah, any to was deprecated (still works, but phasing out in preference of href) and href that begins with http will be parsed as an external link and handled accordingly (open in new tab, etc)... This can be forced manually by adding the isExternal prop, but this is rarely needed.

@wackerow wackerow merged commit d02237f into ethereum:dev May 7, 2024
6 checks passed
Copy link

gitpoap-bot bot commented May 7, 2024

Congrats, your important contribution to this open-source project has earned you a GitPOAP!

Be sure to join the Ethereum.org discord if you are interested in contributing further to the project or have any questions for the team.

GitPOAP: 2024 Ethereum.org Contributor:

GitPOAP: 2024 Ethereum.org Contributor GitPOAP Badge

Head to gitpoap.io & connect your GitHub account to mint!

Learn more about GitPOAPs here.

@wackerow
Copy link
Member

wackerow commented May 7, 2024

@all-contributors please add @barskhianfannie for maintenance

Copy link
Contributor

@wackerow

I've put up a pull request to add @barskhianfannie! 🎉

This was referenced May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content 🖋️ This involves copy additions or edits needs grooming Needs discussion during a grooming session needs review 👀 Review is needed for this issue or pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update "Swap ETH for USDC" link on stablecoin page
3 participants