clear pages when clicking on a page in the command dialog
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m29s
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m29s
This commit is contained in:
parent
e277645333
commit
782b5efd4b
@ -97,8 +97,9 @@ export function CommandMenu({ ...props }: ButtonProps): ReactElement {
|
||||
<CommandItem
|
||||
key={page.slug}
|
||||
onSelect={() => {
|
||||
router.push(`/docs/${page.slug}`);
|
||||
setOpen(false);
|
||||
router.push(`/docs/${page.slug}`); // Go to the page
|
||||
setOpen(false); // Close the dialog
|
||||
setPages(undefined); // Clear the pages
|
||||
}}
|
||||
className="flex flex-col items-start gap-1"
|
||||
>
|
||||
|
Loading…
x
Reference in New Issue
Block a user