tumao 4 years ago
parent
commit
ffdc6fe2fc

+ 1 - 1
client/src/components/layout/GlobalToolbar.tsx

@@ -60,7 +60,7 @@ const GlobalToolbar = (props: { width: String }) => {
   const { t } = useTranslation();
   const classes = useStyles(props);
   const { t: btnTrans } = useTranslation('btn');
-  const navTrans: any = t('nav');
+  // const navTrans: any = t('nav');
 
   // const SearchIcon = icons.search;
   const AddIcon = icons.add;

+ 8 - 8
client/src/components/menu/NavMenu.tsx

@@ -108,14 +108,14 @@ const NavMenu: FC<NavMenuType> = props => {
   };
 
   const { t } = useTranslation();
-  const navTrans: { [key in string]: string | object } = t('nav');
+  // const navTrans: { [key in string]: string | object } = t('nav');
 
-  useEffect(() => {
-    const activeLabel = location.pathname.includes('queries')
-      ? (navTrans.query as string)
-      : (navTrans.database as string);
-    setActive(activeLabel);
-  }, [location.pathname, navTrans.query, navTrans.database]);
+  // useEffect(() => {
+  //   const activeLabel = location.pathname.includes('queries')
+  //     ? (navTrans.query as string)
+  //     : (navTrans.database as string);
+  //   setActive(activeLabel);
+  // }, [location.pathname, navTrans.query, navTrans.database]);
 
   const NestList = (props: { data: NavMenuItem[]; className?: string }) => {
     const { className, data } = props;
@@ -179,7 +179,7 @@ const NavMenu: FC<NavMenuType> = props => {
           <Logo classes={{ root: classes.logo }} />
         </div>
 
-        <NestList data={data} />
+        {/* <NestList data={data} /> */}
       </div>
     </List>
   );

+ 4 - 0
client/src/i18n/cn/common.ts

@@ -16,6 +16,10 @@ const commonTrans = {
     nextLabel: 'next page',
     prevLabel: 'prev page',
   },
+  copy: {
+    copy: 'Copy',
+    copied: 'Copied',
+  },
 };
 
 export default commonTrans;

+ 4 - 0
client/src/i18n/en/common.ts

@@ -16,6 +16,10 @@ const commonTrans = {
     nextLabel: 'next page',
     prevLabel: 'prev page',
   },
+  copy: {
+    copy: 'Copy',
+    copied: 'Copied',
+  },
 };
 
 export default commonTrans;