瀏覽代碼

set CUSTOM before getting currentSidebarContents

yuya-o 3 年之前
父節點
當前提交
5dde0c7421
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/app/src/stores/ui.tsx

+ 1 - 1
packages/app/src/stores/ui.tsx

@@ -267,7 +267,7 @@ export const useSidebarCollapsed = (initialData?: boolean): SWRResponse<boolean,
 };
 };
 
 
 export const useCurrentSidebarContents = (initialData?: SidebarContentsType): SWRResponse<SidebarContentsType, Error> => {
 export const useCurrentSidebarContents = (initialData?: SidebarContentsType): SWRResponse<SidebarContentsType, Error> => {
-  return useStaticSWR('sidebarContents', initialData, { fallbackData: SidebarContentsType.TREE });
+  return useStaticSWR('sidebarContents', initialData, { fallbackData: SidebarContentsType.CUSTOM });
 };
 };
 
 
 export const useCurrentProductNavWidth = (initialData?: number): SWRResponse<number, Error> => {
 export const useCurrentProductNavWidth = (initialData?: number): SWRResponse<number, Error> => {