-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
chore: use href
instead of deprecated to prop
in InlineLink usage
#12278
Conversation
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
cc @nhsz would love your 👀 |
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.
LGTM, thanks @enjoyooor!
Just waiting on second review as it touches a lot.
@all-contributors please add @enjoyooor for code |
I've put up a pull request to add @enjoyooor! 🎉 |
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.
Thanks for the refactor @enjoyooor. Everything looks good but there is one import condition that I don't think is necessary and shouldn't be included in the scope of this PR. LMK what do you think.
import { | ||
default as uniswap, | ||
default as uniswapec, | ||
} from "@/public/dapps/uni.png" |
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.
Why are we doing this?
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 believe this is auto formatting according to eslint/prettier
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.
@pettinarip that is indeed an auto-fix from eslint, as it is the same image file imported twice. I guess eslint is unaware that it's an image file, so it consolidated the alias naming.
I'll look at throwing up a quick PR to address this duplication.
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.
Aha! didn't notice that, good call, thanks. Ok, so I guess we are ok then here 👍🏼
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.
Thanks @enjoyooor! 💯
WalkthroughThe overall change across various components and pages involves updating the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (28)
- src/components/CommunityEvents/index.tsx (1 hunks)
- src/components/FileContributors.tsx (2 hunks)
- src/components/History/NetworkUpgradeSummary.tsx (2 hunks)
- src/components/Layer2/Layer2Onboard.tsx (2 hunks)
- src/components/Layer2ProductCard.tsx (1 hunks)
- src/components/MeetupList.tsx (1 hunks)
- src/components/RandomAppList.tsx (2 hunks)
- src/components/RollupProductDevDoc.tsx (2 hunks)
- src/components/StablecoinAccordion/index.tsx (4 hunks)
- src/components/Staking/StakingStatsBox.tsx (3 hunks)
- src/components/StatsBoxGrid/GridItem.tsx (1 hunks)
- src/components/TutorialMetadata.tsx (1 hunks)
- src/components/UpcomingEventsList.tsx (1 hunks)
- src/components/UpgradeBannerNotification.tsx (2 hunks)
- src/pages/assets.tsx (1 hunks)
- src/pages/contributing/translation-program/acknowledgements.tsx (2 hunks)
- src/pages/contributing/translation-program/contributors.tsx (2 hunks)
- src/pages/dapps.tsx (2 hunks)
- src/pages/developers/index.tsx (5 hunks)
- src/pages/developers/tutorials.tsx (1 hunks)
- src/pages/eth.tsx (3 hunks)
- src/pages/gas.tsx (1 hunks)
- src/pages/languages.tsx (3 hunks)
- src/pages/layer-2.tsx (7 hunks)
- src/pages/run-a-node.tsx (6 hunks)
- src/pages/stablecoins.tsx (5 hunks)
- src/pages/staking/deposit-contract.tsx (2 hunks)
- src/pages/what-is-ethereum.tsx (3 hunks)
Files not reviewed due to errors (1)
- (no review received)
Additional comments: 80
src/components/UpgradeBannerNotification.tsx (1)
- 15-15: The update from
to
tohref
in theInlineLink
component aligns with the PR's objectives and modern HTML semantics. Good job on keeping the code clean and up-to-date.src/components/RandomAppList.tsx (1)
- 65-65: The update from
to
tohref
in theInlineLink
component is correctly implemented. This change ensures the component's usage aligns with modern web standards.src/components/RollupProductDevDoc.tsx (3)
- 40-40: The prop update from
to
tohref
for thewebsite
link in theInlineLink
component is correctly implemented, aligning with the PR's objectives.- 45-45: The prop update from
to
tohref
for thedeveloperDocs
link in theInlineLink
component is correctly implemented, ensuring the component's usage aligns with modern web standards.- 50-50: The prop update from
to
tohref
for thel2beat
link in theInlineLink
component is correctly implemented. This change enhances the component's compatibility with current web practices.src/components/Layer2ProductCard.tsx (3)
- 86-86: The prop update from
to
tohref
for thebridge
link in theInlineLink
component is correctly implemented, aligning with the PR's objectives.- 91-91: The prop update from
to
tohref
for theecosystemPortal
link in theInlineLink
component is correctly implemented, ensuring the component's usage aligns with modern web standards.- 96-96: The prop update from
to
tohref
for thetokenLists
link in theInlineLink
component is correctly implemented. This change enhances the component's compatibility with current web practices.src/components/History/NetworkUpgradeSummary.tsx (2)
- 54-54: The prop update from
to
tohref
for various links in theInlineLink
component is correctly implemented, aligning with the PR's objectives and enhancing the component's compatibility with current web practices.- 100-100: The prop update from
to
tohref
for thewaybackLink
in theInlineLink
component is correctly implemented. This change ensures the component's usage aligns with modern web standards.src/components/Staking/StakingStatsBox.tsx (3)
- 99-99: The prop update from
to
tohref
for theBeaconcha.in
link in theInlineLink
component is correctly implemented, aligning with the PR's objectives and enhancing the component's compatibility with current web practices.- 110-110: The prop update from
to
tohref
for anotherBeaconcha.in
link in theInlineLink
component is correctly implemented. This change ensures the component's usage aligns with modern web standards.- 121-121: The prop update from
to
tohref
for theBeaconcha.in/ethstore
link in theInlineLink
component is correctly implemented. This change enhances the component's compatibility with current web practices.src/components/TutorialMetadata.tsx (1)
- 84-84: The prop update from
to
tohref
for the source link in theInlineLink
component is correctly implemented, aligning with the PR's objectives and enhancing the component's compatibility with current web practices.src/components/UpcomingEventsList.tsx (1)
- 89-89: The prop update from
to
tohref
for the link to the community events JSON file in theInlineLink
component is correctly implemented, aligning with the PR's objectives and enhancing the component's compatibility with current web practices.src/components/StatsBoxGrid/GridItem.tsx (1)
- 19-19: The prop update from
to
tohref
for the link to the metric's API provider in theInlineLink
component is correctly implemented, aligning with the PR's objectives and enhancing the component's compatibility with current web practices.src/components/FileContributors.tsx (2)
- 63-63: The update from
to
tohref
for theInlineLink
component aligns with the PR's objective to adhere to the updated component API. This change ensures that the link will function correctly with the new prop.- 150-150: The change from
to
tohref
for theInlineLink
component usage here is consistent with the PR's goal and correctly updates the component to use the new prop. This ensures proper navigation functionality.src/pages/contributing/translation-program/contributors.tsx (2)
- 153-153: The update from
to
tohref
for theInlineLink
component within theContributors
component is correctly implemented, aligning with the PR's objective to use the updated prop. This ensures the link will function as expected.- 181-181: This change from
to
tohref
for theInlineLink
component is consistent with the PR's goal and correctly updates the component to use the new prop. It ensures the link will navigate correctly.src/components/CommunityEvents/index.tsx (1)
- 70-70: The change from
to
tohref
in theInlineLink
component within theEvent
subcomponent ofCommunityEvents
is correctly implemented. This update aligns with the PR's objective and ensures the link will function as intended.src/pages/languages.tsx (3)
- 104-104: The update from
to
tohref
for theInlineLink
component here correctly aligns with the PR's objective. This ensures that the link will function correctly with the new prop.- 111-111: This change from
to
tohref
for theInlineLink
component is consistent with the PR's goal and correctly updates the component to use the new prop. It ensures the link will navigate correctly.- 206-206: The update from
to
tohref
for theInlineLink
component in this context is correctly implemented, aligning with the PR's objective to use the updated prop. This ensures proper navigation functionality.src/components/StablecoinAccordion/index.tsx (3)
- 138-138: The change from
to
tohref
in theInlineLink
component within theStablecoinAccordion
component is correctly implemented. This update aligns with the PR's objective and ensures the link will function as intended.- 227-227: This update from
to
tohref
for theInlineLink
component is consistent with the PR's goal and correctly updates the component to use the new prop. It ensures the link will navigate correctly.- 251-251: The change from
to
tohref
for theInlineLink
component here correctly aligns with the PR's objective. This ensures that the link will function correctly with the new prop.src/components/Layer2/Layer2Onboard.tsx (2)
- 238-238: The change from
to
tohref
for the link to "/bridges/" is correctly implemented and aligns with the PR objectives.- 261-261: The update from
to
tohref
for the link to "/wallets/find-wallet/" is correctly done, ensuring the component's usage is up to date with the latest standards.src/pages/contributing/translation-program/acknowledgements.tsx (1)
- 125-125: The replacement of
to
withhref
for the link to "/contributing/translation-program/contributors/" is correctly implemented, aligning with the PR's objectives to updateInlineLink
usage.src/pages/gas.tsx (1)
- 263-263: The change from
to
tohref
in theInlineLink
usage aligns with modern web standards and improves link handling. Ensure that theInlineLink
component is updated to correctly handle thehref
prop for navigation.src/pages/staking/deposit-contract.tsx (2)
- 354-354: The change from
to
tohref
in theInlineLink
usage aligns with modern web standards and improves link handling. Ensure that theInlineLink
component is updated to correctly handle thehref
prop for navigation.- 481-481: The change from
to
tohref
in theInlineLink
usage aligns with modern web standards and improves link handling. Ensure that theInlineLink
component is updated to correctly handle thehref
prop for navigation.src/pages/eth.tsx (6)
- 429-429: The change from
to
tohref
in theInlineLink
component is correctly implemented here, aligning with the PR's objective to update deprecated prop usage.- 452-452: This instance of updating the
InlineLink
component fromto
tohref
is correctly done, ensuring the component's usage is up to date with the latest prop expectations.- 482-482: The replacement of the
to
prop withhref
in thisInlineLink
component is correctly applied, contributing to the consistency and modernization of the component's usage across the project.- 488-488: Correctly updated the
InlineLink
component fromto
tohref
, which is in line with the PR's goal to replace deprecated prop usage.- 494-494: This change from
to
tohref
in theInlineLink
component is properly implemented, ensuring the component adheres to the current prop usage standards.- 500-500: Successfully updated the
InlineLink
component fromto
tohref
, maintaining the project's adherence to the latest component prop expectations.src/pages/developers/tutorials.tsx (1)
- 250-250: The change from
to
tohref
in theInlineLink
component aligns with the PR's objective to update deprecated prop usage. This ensures compatibility with the component's expected behavior and adheres to current best practices.src/pages/developers/index.tsx (2)
- 258-258: The update from
to
tohref
in theInlineLink
component is correctly implemented, ensuring the component's usage aligns with the latest standards.- 339-401: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [289-490]
All instances of
InlineLink
components in this file have been correctly updated fromto
tohref
, following the PR's objective to replace the deprecated prop. This change is consistent across the file and improves the maintainability and future-proofing of the code.src/pages/assets.tsx (3)
- 163-163: The update from
to
tohref
in theInlineLink
component usage aligns with the PR's objective to adhere to current best practices and the component's expected behavior. This change ensures proper navigation handling within theAssetsPage
component.- 168-168: Similar to the previous comment, this change correctly updates the
InlineLink
component usage fromto
tohref
. It's consistent with the PR's goal and improves the link's accessibility and usability.- 173-173: This is another instance where the
InlineLink
component's prop is updated fromto
tohref
, further ensuring that the application's navigation is handled correctly. The consistency in applying this change across different links in theAssetsPage
component is commendable.src/pages/layer-2.tsx (14)
- 325-325: The change from
to
tohref
in theInlineLink
component is correctly implemented here. This aligns with the PR's objective to update the usage ofInlineLink
to reflect current best practices.- 361-361: The update from
to
tohref
in thisInlineLink
component is correctly applied. It's important to ensure that the target URL is correctly formatted and accessible.- 442-442: This change correctly updates the
InlineLink
component from usingto
tohref
. It's good practice to verify that the newhref
prop points to a valid and intended destination.- 580-580: The replacement of
to
withhref
in theInlineLink
component here is in line with the PR's objectives. Ensure that the link leads to the correct section or page as intended.- 585-585: Correctly updated the
InlineLink
component fromto
tohref
. It's crucial to check that all links are functional and lead to the correct resources.- 635-635: The update from
to
tohref
in thisInlineLink
component is correctly implemented. Always verify that the link is directing users to the correct and relevant information.- 640-640: This change from
to
tohref
in theInlineLink
component is correctly applied. It's essential to ensure that the link is accurate and leads to the intended destination.- 656-656: The replacement of
to
withhref
in theInlineLink
component here is correctly done. Confirm that the link directs to the appropriate resource or page.- 664-664: Correctly updated the
InlineLink
component fromto
tohref
. It's important to ensure that the link is functional and leads to the intended content.- 678-678: The change from
to
tohref
in theInlineLink
component is correctly implemented here. Verify that the link points to the correct external resource.- 684-684: This update from
to
tohref
in theInlineLink
component is correctly applied. Ensure that the link is directing users to the intended external resource.- 690-690: The replacement of
to
withhref
in theInlineLink
component here is in line with the PR's objectives. Confirm that the link leads to the correct YouTube video or resource.- 696-696: Correctly updated the
InlineLink
component fromto
tohref
. It's crucial to verify that the link is functional and directs to the intended YouTube video or resource.- 702-702: This change from
to
tohref
in theInlineLink
component is correctly implemented. Always ensure that the link points to the correct external article or resource.src/pages/stablecoins.tsx (5)
- 241-241: The change from
to
tohref
prop in theInlineLink
component is correctly implemented here, aligning with the PR's objective to update the component usage according to the latest best practices. This ensures proper link behavior and enhances accessibility.- 427-427: The update from
to
tohref
for internal navigation links within theInlineLink
component is correctly applied. This change is consistent with the PR's goal and improves the semantic correctness of the links.- 484-484: This modification from
to
tohref
in theInlineLink
component is appropriate and follows the PR's intention to standardize link handling across the application. It's important to ensure that all internal links are correctly updated to maintain consistent navigation behavior.- 489-489: The change from
to
tohref
in theInlineLink
component for internal navigation is correctly implemented. This adjustment is in line with the PR's objectives and contributes to the overall improvement of link accessibility and usability within the application.- 696-696: The conversion from
to
tohref
for theInlineLink
component is correctly done here, aligning with the PR's goal to update deprecated prop usage. This change ensures that external links are handled correctly, enhancing the user experience.src/pages/what-is-ethereum.tsx (6)
- 298-298: The change from
to
tohref
prop in theInlineLink
component is correctly implemented here. This aligns with the PR's objective to update the component usage according to the latest best practices.- 695-695: The change from
to
tohref
prop in theInlineLink
component is correctly implemented here. This aligns with the PR's objective to update the component usage according to the latest best practices.- 702-702: The change from
to
tohref
prop in theInlineLink
component is correctly implemented here. This aligns with the PR's objective to update the component usage according to the latest best practices.- 733-733: The change from
to
tohref
prop in theInlineLink
component is correctly implemented here. This aligns with the PR's objective to update the component usage according to the latest best practices.- 739-739: The change from
to
tohref
prop in theInlineLink
component is correctly implemented here. This aligns with the PR's objective to update the component usage according to the latest best practices.- 746-746: The change from
to
tohref
prop in theInlineLink
component is correctly implemented here. This aligns with the PR's objective to update the component usage according to the latest best practices.src/pages/run-a-node.tsx (8)
- 547-547: The change from
to
tohref
in theInlineLink
component is correctly implemented here, aligning with the PR's objective to update deprecated prop usage.- 826-826: The change from
to
tohref
in theInlineLink
component is correctly implemented here, aligning with the PR's objective to update deprecated prop usage.- 833-833: The change from
to
tohref
in theInlineLink
component is correctly implemented here, aligning with the PR's objective to update deprecated prop usage.- 838-838: The change from
to
tohref
in theInlineLink
component is correctly implemented here, aligning with the PR's objective to update deprecated prop usage.- 882-882: The change from
to
tohref
in theInlineLink
component is correctly implemented here, aligning with the PR's objective to update deprecated prop usage.- 893-893: The change from
to
tohref
in theInlineLink
component is correctly implemented here, aligning with the PR's objective to update deprecated prop usage.- 902-902: The change from
to
tohref
in theInlineLink
component is correctly implemented here, aligning with the PR's objective to update deprecated prop usage.- 911-911: The change from
to
tohref
in theInlineLink
component is correctly implemented here, aligning with the PR's objective to update deprecated prop usage.src/pages/dapps.tsx (2)
- 117-120: The change to import
uni.png
using ES6 destructuring syntax and assigning it touniswap
anduniswapec
is syntactically correct. This was confirmed to be an auto-fix by eslint due to the same image file being imported twice. The discussion in the PR comments provides additional context.- 1862-1862: Changing the
InlineLink
component's attribute fromto
tohref
aligns with the PR's objective to update the usage ofInlineLink
according to current best practices. This change is consistent with standard HTML semantics for links.
Dupe of #12218 (accidentally closed), prefer to contribute using my personal account
Noticed that the
to
prop inInlineLink
component is deprecated, so updating all usages to reflect this.Summary by CodeRabbit
New Features
Bug Fixes
to
props to standardhref
attributes, ensuring proper redirection and improving user navigation on the site.Refactor
Chores