-
Notifications
You must be signed in to change notification settings - Fork 3
feat(web): redirect-main-curate-item-to-list #43
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
Conversation
WalkthroughThe main change in the Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant User
participant ItemDisplay
participant Navigate as useNavigate
participant ListPage
User->>ItemDisplay: Access ItemDisplay Component
ItemDisplay->>useEffect: useEffect triggered
useEffect->>ItemDisplay: Check listAddress and itemDetails
alt Valid address and details
ItemDisplay->>Navigate: Call navigate with listAddress
Navigate->>ListPage: Redirect to ListPage
end
Poem
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 (
|
✅ Deploy Preview for curate-v2 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- web/src/pages/AllLists/ItemDisplay/index.tsx (1 hunks)
Files not reviewed due to errors (1)
- web/src/pages/AllLists/ItemDisplay/index.tsx (no review received)
Additional context used
Biome
web/src/pages/AllLists/ItemDisplay/index.tsx
[error] 11-11: Unsafe usage of optional chaining. (lint/correctness/noUnsafeOptionalChaining)
If it short-circuits with 'undefined' the evaluation will throw TypeError 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.
lgtm
This change adds a feature to re-direct items that are lists.
This is only done for lists that are item in the Main curate since we don't have any other list of lists.
Example :
https://deploy-preview-43--curate-v2.netlify.app/#/lists/item/0x9e4e1d9bfd04530fb0de8df9ba6f7783fd1ce1e8f78b67fb644512017ef2b405@0xad0a109cc2bf4da3a9c505155e15e8c05bd95183
PR-Codex overview
This PR enhances the
ItemDisplay
component by adding a redirect feature for items belonging to the main curate list.Detailed summary
useNavigate
fromreact-router-dom
MAIN_CURATE_ADDRESS
constantuseEffect
for redirect functionalitySummary by CodeRabbit