Yuki Takei 4 лет назад
Родитель
Сommit
1f02c05b9e
1 измененных файлов с 4 добавлено и 3 удалено
  1. 4 3
      packages/app/src/components/Sidebar.tsx

+ 4 - 3
packages/app/src/components/Sidebar.tsx

@@ -10,6 +10,7 @@ import {
 import DrawerToggler from './Navbar/DrawerToggler';
 import DrawerToggler from './Navbar/DrawerToggler';
 
 
 import SidebarNav from './Sidebar/SidebarNav';
 import SidebarNav from './Sidebar/SidebarNav';
+import SidebarContents from './Sidebar/SidebarContents';
 
 
 const sidebarMinWidth = 240;
 const sidebarMinWidth = 240;
 const sidebarMinimizeWidth = 20;
 const sidebarMinimizeWidth = 20;
@@ -47,7 +48,7 @@ const GlobalNavigationSkelton = () => {
 };
 };
 
 
 
 
-const SidebarContents = () => {
+const SidebarContentsWrapper = () => {
   const scrollTargetSelector = '#grw-sidebar-contents-scroll-target';
   const scrollTargetSelector = '#grw-sidebar-contents-scroll-target';
 
 
   const calcViewHeight = useCallback(() => {
   const calcViewHeight = useCallback(() => {
@@ -172,7 +173,7 @@ const Sidebar = (props: Props) => {
 
 
   useEffect(() => {
   useEffect(() => {
     // this.hackUIController();
     // this.hackUIController();
-    // setMounted(true);
+    setMounted(true);
   }, []);
   }, []);
 
 
   useEffect(() => {
   useEffect(() => {
@@ -286,7 +287,7 @@ const Sidebar = (props: Props) => {
               >
               >
                 <div className="grw-contextual-navigation-child">
                 <div className="grw-contextual-navigation-child">
                   <div role="group" className={`grw-contextual-navigation-sub ${!isHover && isCollapsed ? 'collapsed' : ''}`}>
                   <div role="group" className={`grw-contextual-navigation-sub ${!isHover && isCollapsed ? 'collapsed' : ''}`}>
-                    { isMounted ? <SidebarContents></SidebarContents> : <SidebarSkeltonContents></SidebarSkeltonContents> }
+                    { isMounted ? <SidebarContentsWrapper></SidebarContentsWrapper> : <SidebarSkeltonContents></SidebarSkeltonContents> }
                   </div>
                   </div>
                 </div>
                 </div>
               </div>
               </div>