|
@@ -18,6 +18,7 @@ import {
|
|
|
useCsrfToken, useIsSearchScopeChildrenAsDefault,
|
|
useCsrfToken, useIsSearchScopeChildrenAsDefault,
|
|
|
useRegistrationWhitelist, useShowPageLimitationXL, useRendererConfig, useIsEnabledMarp,
|
|
useRegistrationWhitelist, useShowPageLimitationXL, useRendererConfig, useIsEnabledMarp,
|
|
|
} from '~/stores/context';
|
|
} from '~/stores/context';
|
|
|
|
|
+import { useSWRxCurrentPage } from '~/stores/page';
|
|
|
import loggerFactory from '~/utils/logger';
|
|
import loggerFactory from '~/utils/logger';
|
|
|
|
|
|
|
|
import { NextPageWithLayout } from '../_app.page';
|
|
import { NextPageWithLayout } from '../_app.page';
|
|
@@ -87,8 +88,6 @@ const MePage: NextPageWithLayout<Props> = (props: Props) => {
|
|
|
|
|
|
|
|
useIsSearchPage(false);
|
|
useIsSearchPage(false);
|
|
|
|
|
|
|
|
- useCurrentUser(props.currentUser ?? null);
|
|
|
|
|
-
|
|
|
|
|
useRegistrationWhitelist(props.registrationWhitelist);
|
|
useRegistrationWhitelist(props.registrationWhitelist);
|
|
|
|
|
|
|
|
useShowPageLimitationXL(props.showPageLimitationXL);
|
|
useShowPageLimitationXL(props.showPageLimitationXL);
|
|
@@ -97,6 +96,12 @@ const MePage: NextPageWithLayout<Props> = (props: Props) => {
|
|
|
useCsrfToken(props.csrfToken);
|
|
useCsrfToken(props.csrfToken);
|
|
|
useGrowiCloudUri(props.growiCloudUri);
|
|
useGrowiCloudUri(props.growiCloudUri);
|
|
|
|
|
|
|
|
|
|
+ useCurrentUser(props.currentUser ?? null);
|
|
|
|
|
+
|
|
|
|
|
+ // clear the cache for the current page
|
|
|
|
|
+ const { mutate } = useSWRxCurrentPage();
|
|
|
|
|
+ mutate(undefined, { revalidate: false });
|
|
|
|
|
+
|
|
|
// init sidebar config with UserUISettings and sidebarConfig
|
|
// init sidebar config with UserUISettings and sidebarConfig
|
|
|
useInitSidebarConfig(props.sidebarConfig, props.userUISettings);
|
|
useInitSidebarConfig(props.sidebarConfig, props.userUISettings);
|
|
|
|
|
|