Description
On a Transaction detail page, when a user hovers over an address, the address should be highlighted in a yellow-ish color. Other addresses on this page that are equal to the address being hovered should also be highlighted.
Changes
Create a AddressProvider and AddressContext.
File: AddressContext.tsx
Description: Use these functions to provide the status of equal addresses in any part of the project, with AddressProviderwrapping the body in layout.tsx.
Create a AddressLink
File: AddressLink.tsx
Description:
This component is for highlighting equal addresses with a yellow-ish dashed border.
If the href prop is an external link, then it shows an icon.
Implement the AddressLink into latest-transactions
File: latest-transactions.tsx
Description:
Use the AddressLink component in From/To Addresses to highlight their equals.
Notes
The AddressLink component can be used in any part of the project.
Feature: Highlight Equal Addresses | Issue #10
Description On a Transaction detail page, when a user hovers over an address, the address should be highlighted in a yellow-ish color. Other addresses on this page that are equal to the address being hovered should also be highlighted.
Changes
Create a AddressProvider and AddressContext.
AddressProvider
wrapping the body in layout.tsx.Create a AddressLink
Implement the AddressLink into latest-transactions
Notes
Images
HighLight equal addresses (Dark Theme)![image](https://github.com/walnuthq/op-scan/assets/93002899/2e61c692-3c44-487d-9479-f20d2e26cf62)
HighLight equal addresses (Light Theme)![image](https://github.com/walnuthq/op-scan/assets/93002899/850fb797-7636-460e-b115-7b3c0d7c7166)
External Icon![image](https://github.com/walnuthq/op-scan/assets/93002899/8c63f9f7-c500-4024-8b9b-2932c4eda800)