|
|
@@ -10,15 +10,19 @@ import { IEditorSettings } from '~/interfaces/editor-settings';
|
|
|
import { SlackChannels } from '~/interfaces/user-trigger-notification';
|
|
|
|
|
|
import {
|
|
|
+ useCurrentPathname,
|
|
|
useCurrentUser, useDefaultIndentSize, useIsGuestUser,
|
|
|
} from './context';
|
|
|
// import { localStorageMiddleware } from './middlewares/sync-to-storage';
|
|
|
-import { useCurrentPagePath, useSWRxTagsInfo } from './page';
|
|
|
+import { useSWRxTagsInfo } from './page';
|
|
|
import { useStaticSWR } from './use-static-swr';
|
|
|
|
|
|
|
|
|
export const useEditingMarkdown = (initialData?: string): SWRResponse<string, Error> => {
|
|
|
- const { data: currentPagePath } = useCurrentPagePath();
|
|
|
+ // need to include useCurrentPathname not useCurrentPagePath
|
|
|
+ // https://github.com/weseek/growi/pull/7301
|
|
|
+ const { data: currentPagePath } = useCurrentPathname();
|
|
|
+
|
|
|
return useStaticSWR(['editingMarkdown', currentPagePath], initialData);
|
|
|
};
|
|
|
|