|
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
|
|
|
|
|
|
|
|
import { DropdownItem } from 'reactstrap';
|
|
import { DropdownItem } from 'reactstrap';
|
|
|
|
|
|
|
|
-import { OnRenamedFunction, OnDeletedFunction } from '~/interfaces/ui';
|
|
|
|
|
|
|
+import { OnDuplicatedFunction, OnRenamedFunction, OnDeletedFunction } from '~/interfaces/ui';
|
|
|
import { IPageHasId, IPageWithMeta } from '~/interfaces/page';
|
|
import { IPageHasId, IPageWithMeta } from '~/interfaces/page';
|
|
|
|
|
|
|
|
import { withUnstatedContainers } from '../UnstatedUtils';
|
|
import { withUnstatedContainers } from '../UnstatedUtils';
|
|
@@ -184,7 +184,10 @@ const GrowiContextualSubNavigation = (props) => {
|
|
|
}, [pageId]);
|
|
}, [pageId]);
|
|
|
|
|
|
|
|
const duplicateItemClickedHandler = useCallback(async(page: IPageForPageDuplicateModal) => {
|
|
const duplicateItemClickedHandler = useCallback(async(page: IPageForPageDuplicateModal) => {
|
|
|
- openDuplicateModal(page);
|
|
|
|
|
|
|
+ const duplicatedHandler: OnDuplicatedFunction = (fromPath, toPath) => {
|
|
|
|
|
+ window.location.href = toPath;
|
|
|
|
|
+ };
|
|
|
|
|
+ openDuplicateModal(page, { onDuplicated: duplicatedHandler });
|
|
|
}, [openDuplicateModal]);
|
|
}, [openDuplicateModal]);
|
|
|
|
|
|
|
|
const renameItemClickedHandler = useCallback(async(page: IPageForPageRenameModal) => {
|
|
const renameItemClickedHandler = useCallback(async(page: IPageForPageRenameModal) => {
|