mirror of
https://github.com/supabase/supabase.git
synced 2026-06-21 08:46:00 +08:00
## Context Related to FE-2461 Just following from the previous part [here](https://github.com/supabase/supabase/pull/41819) PR removes the usage of `useQueryStateWithSelect` in - Publishable API Keys (Delete) - Secret API Keys (Delete) - Auth Hooks (Edit) - Database Indexes (Edit + Delete) - Ensures that the appropriate behaviours are in place too - Toast should show when landing on a page with an invalid ID param that entity doesn't exist - Toast should not show when deleting the param (which useQueryStateWithSelect was using useRef as a workaround prior) ## To test - [ ] API keys (Both publishable and secret key) - URL updates when deleting a key - Refresh the page, delete dialog should open with the right key - Update the query param to something invalid, should see the "not found" toast - Delete a key, should only see a success toast - [ ] Auth Hooks - URL updates when adding / edit a hook - Refresh the page, panel should open with the right hook - Update the query param to something invalid, should see the "not found" toast - [ ] Database Indexes - URL updates when editing/deleting an index - Refresh the page, delete dialog should open with the right index - Update the query param to something invalid, should see the "not found" toast - Delete an index, should only see a success toast <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved error handling and user notifications when API keys, hooks, or indexes are deleted or become unavailable; users now see clear toasts when a target item cannot be found. * **Refactoring** * Internal state and dialog visibility handling for API keys, hooks, and database indexes have been simplified to make UI flows more reliable and consistent. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Ali Waseem <waseema393@gmail.com>