fix(hk): protect unsaved editors and await prefix save results
This commit is contained in:
1 parent
89af4eb1f6
commit
d5091d1a73
11 files changed
+602
-231
No files matched your search
@@ -21,6 +21,7 @@ import {
|
||||
DialogTrigger,
|
||||
} from "@/components/ui/dialog";
|
||||
import { useDebounce } from "@/hooks/use-debounce";
|
||||
import { confirmUnsavedNavigation } from "@/hooks/use-unsaved-changes";
|
||||
import {
|
||||
type AdminNavigationOptions,
|
||||
visibleAdminNavigation,
|
||||
@@ -152,6 +153,7 @@ export function SearchDialog({
|
||||
}
|
||||
|
||||
function handleSelect(url: string) {
|
||||
if (!confirmUnsavedNavigation()) return;
|
||||
handleOpenChange(false);
|
||||
setQuery("");
|
||||
setResults([]);
|
||||
|
||||
Reference in new issue
Block a user