瀏覽代碼

Merge pull request #7095 from weseek/fix/wideview-not-reflected-new

fix: WideView Setting on ShareLink mode is not reflected
Yuki Takei 3 年之前
父節點
當前提交
99fdf1fe5b
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      packages/app/src/client/services/use-current-layout-class-name.ts

+ 3 - 2
packages/app/src/client/services/use-current-layout-class-name.ts

@@ -1,9 +1,10 @@
-import { useIsContainerFluid } from '~/stores/context';
+import { useIsContainerFluid, useShareLinkId } from '~/stores/context';
 import { useSWRxCurrentPage } from '~/stores/page';
 import { useEditorMode } from '~/stores/ui';
 
 export const useCurrentLayoutClassName = (): string => {
-  const { data: currentPage } = useSWRxCurrentPage();
+  const { data: shareLinkId } = useShareLinkId();
+  const { data: currentPage } = useSWRxCurrentPage(shareLinkId ?? undefined);
 
   const { data: dataIsContainerFluid } = useIsContainerFluid();
   const { getClassNamesByEditorMode } = useEditorMode();