You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[TOOL-4225] Dashboard: Show feedback on cancel transaction button click tool-4225 (#6812)
<!--
## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"
If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):
## Notes for the reviewer
Anything important to call out? Be sure to also clarify these in your comments.
## How to test
Unit tests, playground, etc.
-->
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on refactoring the `CancelTransactionButton` component to use `useMutation` from `@tanstack/react-query` for handling transaction cancellation, replacing the previous notification handling with `toast` for success and error messages.
### Detailed summary
- Added `useMutation` from `@tanstack/react-query`.
- Removed `useTxNotifications` and its related logic.
- Implemented `cancelTransactionMutation` for handling the cancellation request.
- Replaced the old `onClickContinue` function with `cancelTransactions` to manage async mutation.
- Updated the button to use `cancelTransactions` and reflect loading state.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
Copy file name to clipboardExpand all lines: apps/dashboard/src/app/team/[team_slug]/(team)/~/engine/(instance)/[engineId]/overview/components/transaction-timeline.tsx
0 commit comments