|
|
@@ -7,6 +7,7 @@ import React, {
|
|
|
useState,
|
|
|
} from 'react';
|
|
|
import { LoadingSpinner } from '@growi/ui/dist/components';
|
|
|
+import { useAtomValue } from 'jotai';
|
|
|
import { useTranslation } from 'next-i18next';
|
|
|
import {
|
|
|
DropdownItem,
|
|
|
@@ -35,6 +36,7 @@ import type { PageMigrationErrorData } from '~/interfaces/websocket';
|
|
|
import { SocketEventName } from '~/interfaces/websocket';
|
|
|
import { useIsAdmin } from '~/states/context';
|
|
|
import { useSearchKeyword, useSetSearchKeyword } from '~/states/search';
|
|
|
+import { isHidingUserPagesAtom } from '~/states/server-configurations';
|
|
|
import { useGlobalSocket } from '~/states/socket-io';
|
|
|
import type { ILegacyPrivatePage } from '~/states/ui/modal/private-legacy-pages-migration';
|
|
|
import { usePrivateLegacyPagesMigrationModalActions } from '~/states/ui/modal/private-legacy-pages-migration';
|
|
|
@@ -268,6 +270,8 @@ const PrivateLegacyPages = (): JSX.Element => {
|
|
|
const keyword = useSearchKeyword();
|
|
|
const setSearchKeyword = useSetSearchKeyword('/_private-legacy-pages');
|
|
|
|
|
|
+ const isHidingUserPages = useAtomValue(isHidingUserPagesAtom);
|
|
|
+
|
|
|
const [offset, setOffset] = useState<number>(0);
|
|
|
const [limit, setLimit] = useState<number>(INITIAL_PAGING_SIZE);
|
|
|
const [isOpenConvertModal, setOpenConvertModal] = useState<boolean>(false);
|
|
|
@@ -515,6 +519,7 @@ const PrivateLegacyPages = (): JSX.Element => {
|
|
|
const searchControl = useMemo(() => {
|
|
|
return (
|
|
|
<SearchControl
|
|
|
+ isHidingUserPages={isHidingUserPages}
|
|
|
isEnableSort={false}
|
|
|
isEnableFilter={false}
|
|
|
initialSearchConditions={{ keyword: initQ, limit: INITIAL_PAGING_SIZE }}
|
|
|
@@ -522,7 +527,7 @@ const PrivateLegacyPages = (): JSX.Element => {
|
|
|
extraControls={extraControls}
|
|
|
/>
|
|
|
);
|
|
|
- }, [searchInvokedHandler, extraControls]);
|
|
|
+ }, [searchInvokedHandler, extraControls, isHidingUserPages]);
|
|
|
|
|
|
const searchResultListHead = useMemo(() => {
|
|
|
if (data == null) {
|