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: Navigate after delete #4586

Merged
merged 1 commit into from
Apr 11, 2024
Merged

Fix: Navigate after delete #4586

merged 1 commit into from
Apr 11, 2024

Conversation

briangregoryholmes
Copy link
Contributor

@briangregoryholmes briangregoryholmes commented Apr 11, 2024

This PR fixes a variety of issues with the navigate after delete functionality.

  • Removes the navigation side effect from the deleteFileArtifact function
  • Corrects the DashboardMenuItems component to use dashboard routes instead of names
  • Adds a more explicit helper for getting the next valid route

The intended logic is as follows:

If you delete a file that you're not viewing, no navigation should take place. If you delete a file you are viewing, you should be directed to either the next available file of the same type or, if none are available, to the root page.

The details of this implementation will of course change with the file explorer and should allow us to abstract the Assets and MenuItems components so that execution of this logic only exists in one place.

@ericpgreen2 ericpgreen2 merged commit fccb70a into main Apr 11, 2024
6 checks passed
@ericpgreen2 ericpgreen2 deleted the bgh/fix-delete-asset branch April 11, 2024 18:16
ericpgreen2 pushed a commit that referenced this pull request Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants