Skip to content
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

fix: close ledger sheet in request keys flow #6024

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/app/features/ledger/hooks/use-ledger-navigate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,7 @@ export function useLedgerNavigate() {
},

cancelLedgerAction() {
// Use baseUrl to determine where to go on close
const baseUrl = `/${location.pathname.split('/')[1]}`;

return navigate(baseUrl, {
return navigate('..', {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you track back to the PR where I changed it? I think changing it back to '..' will re-introduce this bug.

If you're confident this will work fair enough. I think the problem you hit is a new bug and could be solved by making the baseUrl find the route you are on more accurately

relative: 'path',
replace: true,
state: { ...location.state, wentBack: true },
Expand Down
Loading