|
@@ -39,8 +39,6 @@ import ShareLinkIcon from '../Icons/ShareLinkIcon';
|
|
|
import { NotAvailable } from '../NotAvailable';
|
|
import { NotAvailable } from '../NotAvailable';
|
|
|
import { Skeleton } from '../Skeleton';
|
|
import { Skeleton } from '../Skeleton';
|
|
|
|
|
|
|
|
-import { useOnPageEditorModeButtonClicked } from './hooks';
|
|
|
|
|
-
|
|
|
|
|
import styles from './GrowiContextualSubNavigation.module.scss';
|
|
import styles from './GrowiContextualSubNavigation.module.scss';
|
|
|
import PageEditorModeManagerStyles from './PageEditorModeManager.module.scss';
|
|
import PageEditorModeManagerStyles from './PageEditorModeManager.module.scss';
|
|
|
|
|
|
|
@@ -238,12 +236,9 @@ const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps):
|
|
|
// }, [pageId, mutatePageTagsForEditors, templateTagData, mutateSWRTagsInfo]);
|
|
// }, [pageId, mutatePageTagsForEditors, templateTagData, mutateSWRTagsInfo]);
|
|
|
|
|
|
|
|
const [isPageTemplateModalShown, setIsPageTempleteModalShown] = useState(false);
|
|
const [isPageTemplateModalShown, setIsPageTempleteModalShown] = useState(false);
|
|
|
- const [isCreating, setIsCreating] = useState(false);
|
|
|
|
|
|
|
|
|
|
const { isLinkSharingDisabled } = props;
|
|
const { isLinkSharingDisabled } = props;
|
|
|
|
|
|
|
|
- const onPageEditorModeButtonClicked = useOnPageEditorModeButtonClicked(setIsCreating, path, grant, grantUserGroupId);
|
|
|
|
|
-
|
|
|
|
|
// TODO: implement tags for editor
|
|
// TODO: implement tags for editor
|
|
|
// refs: https://redmine.weseek.co.jp/issues/132125
|
|
// refs: https://redmine.weseek.co.jp/issues/132125
|
|
|
// const tagsUpdatedHandlerForEditMode = useCallback((newTags: string[]): void => {
|
|
// const tagsUpdatedHandlerForEditMode = useCallback((newTags: string[]): void => {
|
|
@@ -361,8 +356,10 @@ const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps):
|
|
|
{isAbleToChangeEditorMode && (
|
|
{isAbleToChangeEditorMode && (
|
|
|
<PageEditorModeManager
|
|
<PageEditorModeManager
|
|
|
editorMode={editorMode}
|
|
editorMode={editorMode}
|
|
|
- isBtnDisabled={isCreating || !!isGuestUser || !!isReadOnlyUser}
|
|
|
|
|
- onPageEditorModeButtonClicked={onPageEditorModeButtonClicked}
|
|
|
|
|
|
|
+ isBtnDisabled={!!isGuestUser || !!isReadOnlyUser}
|
|
|
|
|
+ path={path}
|
|
|
|
|
+ grant={grant}
|
|
|
|
|
+ grantUserGroupId={grantUserGroupId}
|
|
|
/>
|
|
/>
|
|
|
)}
|
|
)}
|
|
|
</div>
|
|
</div>
|