|
@@ -10,6 +10,9 @@ import type {
|
|
|
ISelectableAndIndeterminatable,
|
|
ISelectableAndIndeterminatable,
|
|
|
} from '~/client/interfaces/selectable-all';
|
|
} from '~/client/interfaces/selectable-all';
|
|
|
import type { IFormattedSearchResult } from '~/interfaces/search';
|
|
import type { IFormattedSearchResult } from '~/interfaces/search';
|
|
|
|
|
+import type { RendererConfig } from '~/interfaces/services/renderer';
|
|
|
|
|
+import type { ServerConfigurationProps } from '~/pages/_search/types';
|
|
|
|
|
+import { useHydrateServerConfigurationAtoms } from '~/pages/_search/use-hydrate-server-configurations';
|
|
|
import { useSearchKeyword, useSetSearchKeyword } from '~/states/search';
|
|
import { useSearchKeyword, useSetSearchKeyword } from '~/states/search';
|
|
|
import {
|
|
import {
|
|
|
isHidingUserPagesAtom,
|
|
isHidingUserPagesAtom,
|
|
@@ -44,6 +47,11 @@ type SearchResultListHeadProps = {
|
|
|
onPagingSizeChanged: (size: number) => void;
|
|
onPagingSizeChanged: (size: number) => void;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+type SearchPageProps = {
|
|
|
|
|
+ serverConfig: ServerConfigurationProps['serverConfig'];
|
|
|
|
|
+ rendererConfig: RendererConfig;
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
const SearchResultListHead = React.memo(
|
|
const SearchResultListHead = React.memo(
|
|
|
(props: SearchResultListHeadProps): JSX.Element => {
|
|
(props: SearchResultListHeadProps): JSX.Element => {
|
|
|
const { t } = useTranslation();
|
|
const { t } = useTranslation();
|
|
@@ -102,9 +110,10 @@ const SearchResultListHead = React.memo(
|
|
|
|
|
|
|
|
SearchResultListHead.displayName = 'SearchResultListHead';
|
|
SearchResultListHead.displayName = 'SearchResultListHead';
|
|
|
|
|
|
|
|
-export const SearchPage = (): JSX.Element => {
|
|
|
|
|
|
|
+export const SearchPage = (props: SearchPageProps): JSX.Element => {
|
|
|
const { t } = useTranslation();
|
|
const { t } = useTranslation();
|
|
|
const showPageLimitationL = useAtomValue(showPageLimitationLAtom);
|
|
const showPageLimitationL = useAtomValue(showPageLimitationLAtom);
|
|
|
|
|
+ useHydrateServerConfigurationAtoms(props.serverConfig, props.rendererConfig);
|
|
|
|
|
|
|
|
const keyword = useSearchKeyword();
|
|
const keyword = useSearchKeyword();
|
|
|
const setSearchKeyword = useSetSearchKeyword();
|
|
const setSearchKeyword = useSetSearchKeyword();
|