|
@@ -13,7 +13,7 @@ import ItemsTreeContentSkeleton from '~/client/components/ItemsTree/ItemsTreeCon
|
|
|
import type { TreeItemProps } from '~/client/components/TreeItem';
|
|
import type { TreeItemProps } from '~/client/components/TreeItem';
|
|
|
import { TreeItemLayout } from '~/client/components/TreeItem';
|
|
import { TreeItemLayout } from '~/client/components/TreeItem';
|
|
|
import type { IPageForItem } from '~/interfaces/page';
|
|
import type { IPageForItem } from '~/interfaces/page';
|
|
|
-import { useIsGuestUser, useIsReadOnlyUser } from '~/stores-universal/context';
|
|
|
|
|
|
|
+import { useIsGuestUser, useIsReadOnlyUser } from '~/states/context';
|
|
|
|
|
|
|
|
import { type SelectablePage, isSelectablePage } from '../../../../interfaces/selectable-page';
|
|
import { type SelectablePage, isSelectablePage } from '../../../../interfaces/selectable-page';
|
|
|
import { useSelectedPages } from '../../../services/use-selected-pages';
|
|
import { useSelectedPages } from '../../../services/use-selected-pages';
|
|
@@ -29,8 +29,8 @@ const moduleClass = styles['grw-ai-assistant-management-page-tree-selection'] ??
|
|
|
const SelectablePageTree = memo((props: { onClickAddPageButton: (page: SelectablePage) => void }) => {
|
|
const SelectablePageTree = memo((props: { onClickAddPageButton: (page: SelectablePage) => void }) => {
|
|
|
const { onClickAddPageButton } = props;
|
|
const { onClickAddPageButton } = props;
|
|
|
|
|
|
|
|
- const { data: isGuestUser } = useIsGuestUser();
|
|
|
|
|
- const { data: isReadOnlyUser } = useIsReadOnlyUser();
|
|
|
|
|
|
|
+ const [isGuestUser] = useIsGuestUser();
|
|
|
|
|
+ const [isReadOnlyUser] = useIsReadOnlyUser();
|
|
|
|
|
|
|
|
const pageTreeItemClickHandler = useCallback((page: IPageForItem) => {
|
|
const pageTreeItemClickHandler = useCallback((page: IPageForItem) => {
|
|
|
if (!isSelectablePage(page)) {
|
|
if (!isSelectablePage(page)) {
|