-
Notifications
You must be signed in to change notification settings - Fork 49
Chore/clear local dispute data on mount #1917
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 changes update the dispute-related flow in the web application. In the Popup component, the Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant P as Popup Component
participant R as Router
U->>P: Click close popup
alt PopupType is DISPUTE_CREATED
P->>P: Reset popup values
P->>R: Navigate to "/resolver"
else Other Popup Type
P->>P: Reset popup values
end
sequenceDiagram
participant C as DisputeResolver Component
participant D as DisputeContext
C->>C: Component mounts
C->>D: Invoke resetDisputeData()
D-->>C: Provide fresh dispute data
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
⏰ Context from checks skipped due to timeout of 90000ms (15)
🔇 Additional comments (6)
✨ Finishing Touches
🪧 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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for kleros-v2-university ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for kleros-v2-neo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for kleros-v2-testnet ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Code Climate has analyzed commit 4fee7b3 and detected 0 issues on this pull request. View more on Code Climate. |
|
✅ Deploy Preview for kleros-v2-testnet-devtools 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.
lgtm
PR-Codex overview
This PR primarily focuses on enhancing the handling of dispute data in the application, particularly when navigating away from the dispute creation popup. It ensures that the data is reset appropriately and adds necessary logic to manage the user experience.
Detailed summary
Popup/index.tsx
, added logic to navigate to/resolver
when the popup type isDISPUTE_CREATED
.Resolver/index.tsx
, introducedresetDisputeData
fromNewDisputeContext
and called it within auseEffect
.NewDisputeContext.tsx
, refactored initial dispute data setup by creatinggetInitialDisputeData
function.resetDisputeData
to use fresh data fromgetInitialDisputeData
.Summary by CodeRabbit