diff --git a/src/components/dashboard/PagesManager.tsx b/src/components/dashboard/PagesManager.tsx index bfc890dc..3d84a10f 100644 --- a/src/components/dashboard/PagesManager.tsx +++ b/src/components/dashboard/PagesManager.tsx @@ -252,7 +252,7 @@ export const PagesManager: React.FC<{
- {({ open }: { open: boolean }) => ( + {({ open, close }) => ( <> @@ -454,7 +458,8 @@ const usePageMenuItems = ({ const MenuItems: FC<{ isPost: boolean page: Note -}> = ({ isPost, page }) => { + onClick: () => void +}> = ({ isPost, page, onClick: onClose }) => { const { t } = useTranslation(["dashboard", "site"]) return ( @@ -468,6 +473,7 @@ const MenuItems: FC<{ onClick={(e) => { e.preventDefault() item.onClick() + onClose() }} > {item.icon}