|
|
@@ -12,6 +12,7 @@ import { DrawioViewerScript } from '~/components/Script/DrawioViewerScript';
|
|
|
import type { CrowiRequest } from '~/interfaces/crowi-request';
|
|
|
import type { RendererConfig } from '~/interfaces/services/renderer';
|
|
|
import type { ISidebarConfig } from '~/interfaces/sidebar-config';
|
|
|
+import { useHydrateSidebarAtoms } from '~/states/hydrate/sidebar';
|
|
|
import {
|
|
|
useCsrfToken, useCurrentUser, useIsContainerFluid, useIsSearchPage, useIsSearchScopeChildrenAsDefault,
|
|
|
useIsSearchServiceConfigured, useIsSearchServiceReachable, useRendererConfig, useShowPageLimitationL, useGrowiCloudUri, useCurrentPathname,
|
|
|
@@ -21,7 +22,7 @@ import { useCurrentPageId, useSWRxCurrentPage } from '~/stores/page';
|
|
|
import type { NextPageWithLayout } from './_app.page';
|
|
|
import type { CommonProps } from './utils/commons';
|
|
|
import {
|
|
|
- getNextI18NextConfig, getServerSideCommonProps, generateCustomTitle, useInitSidebarConfig,
|
|
|
+ getNextI18NextConfig, getServerSideCommonProps, generateCustomTitle,
|
|
|
} from './utils/commons';
|
|
|
|
|
|
|
|
|
@@ -67,9 +68,6 @@ const SearchResultPage: NextPageWithLayout<Props> = (props: Props) => {
|
|
|
useIsSearchServiceReachable(props.isSearchServiceReachable);
|
|
|
useIsSearchScopeChildrenAsDefault(props.isSearchScopeChildrenAsDefault);
|
|
|
|
|
|
- // init sidebar config with UserUISettings and sidebarConfig
|
|
|
- useInitSidebarConfig(props.sidebarConfig, props.userUISettings);
|
|
|
-
|
|
|
// render config
|
|
|
useRendererConfig(props.rendererConfig);
|
|
|
|
|
|
@@ -96,7 +94,7 @@ type LayoutProps = Props & {
|
|
|
|
|
|
const Layout = ({ children, ...props }: LayoutProps): JSX.Element => {
|
|
|
// init sidebar config with UserUISettings and sidebarConfig
|
|
|
- useInitSidebarConfig(props.sidebarConfig, props.userUISettings);
|
|
|
+ useHydrateSidebarAtoms(props.sidebarConfig, props.userUISettings);
|
|
|
|
|
|
return (
|
|
|
<SearchResultLayout>
|