Browse Source

bug fix

Signed-off-by: ryjiang <jiangruiyi@gmail.com>
ryjiang 10 months ago
parent
commit
74e80bd48e

+ 8 - 1
client/src/components/layout/Header.tsx

@@ -74,6 +74,13 @@ const useStyles = makeStyles((theme: Theme) => ({
     },
     },
     color: theme.palette.text.primary,
     color: theme.palette.text.primary,
   },
   },
+  extra: {
+    marginLeft: theme.spacing(0.5),
+    '& svg': {
+      fontSize: 15,
+      color: theme.palette.primary.main,
+    },
+  },
 }));
 }));
 
 
 const Header: FC = () => {
 const Header: FC = () => {
@@ -149,7 +156,7 @@ const Header: FC = () => {
           >
           >
             {navInfo.navTitle}
             {navInfo.navTitle}
           </Typography>
           </Typography>
-          {navInfo.extra}
+          <span className={classes.extra}>{navInfo.extra}</span>
         </div>
         </div>
 
 
         <div className={classes.addressWrapper}>
         <div className={classes.addressWrapper}>

+ 1 - 13
client/src/pages/databases/Databases.tsx

@@ -82,13 +82,6 @@ const useStyles = makeStyles((theme: Theme) => ({
     borderRadius: 8,
     borderRadius: 8,
     boxShadow: '0px 6px 30px rgba(0, 0, 0, 0.1)',
     boxShadow: '0px 6px 30px rgba(0, 0, 0, 0.1)',
   },
   },
-  headerIcon: {
-    marginLeft: theme.spacing(0.5),
-    '& svg': {
-      fontSize: 15,
-      color: theme.palette.primary.main,
-    },
-  },
 }));
 }));
 
 
 // Databases page(tree and tabs)
 // Databases page(tree and tabs)
@@ -258,13 +251,8 @@ const Databases = () => {
     databaseName,
     databaseName,
     extra: (
     extra: (
       <>
       <>
-        <CopyButton
-          label=""
-          value={collectionName}
-          className={classes.headerIcon}
-        />
+        <CopyButton label="" value={collectionName} />
         <RefreshButton
         <RefreshButton
-          className={classes.headerIcon}
           onClick={async () => {
           onClick={async () => {
             await fetchCollection(collectionName);
             await fetchCollection(collectionName);
           }}
           }}