guoqqqi commented on code in PR #2585:
URL: https://github.com/apache/apisix-dashboard/pull/2585#discussion_r945478552


##########
web/src/components/Plugin/PluginPage.tsx:
##########
@@ -104,6 +104,34 @@ const PluginPage: React.FC<Props> = ({
     return index === self.indexOf(elem);
   });
 
+  const [showEnablePlugin, setShowEnablePlugin] = useState<boolean>(true);
+  const tabsList = [
+    {
+      title: formatMessage({ id: 'component.plugin.enable' }),
+      key: 'enable',
+    },
+    {
+      title: formatMessage({ id: 'component.plugin.disable' }),
+      key: 'edit',

Review Comment:
   ```suggestion
         key: 'allPlugins',
   ```



##########
web/src/components/Plugin/PluginPage.tsx:
##########
@@ -104,6 +104,34 @@ const PluginPage: React.FC<Props> = ({
     return index === self.indexOf(elem);
   });
 
+  const [showEnablePlugin, setShowEnablePlugin] = useState<boolean>(true);
+  const tabsList = [
+    {
+      title: formatMessage({ id: 'component.plugin.enable' }),
+      key: 'enable',
+    },
+    {
+      title: formatMessage({ id: 'component.plugin.disable' }),
+      key: 'edit',
+    },
+  ];
+  const SwitchTab = () => (
+    <Tabs
+      defaultActiveKey={showEnablePlugin ? 'enable' : 'edit'}

Review Comment:
   ```suggestion
         defaultActiveKey={showEnablePlugin ? 'enablePlugins' : 'allPlugins'}
   ```



##########
web/src/components/Plugin/PluginPage.tsx:
##########
@@ -104,6 +104,34 @@ const PluginPage: React.FC<Props> = ({
     return index === self.indexOf(elem);
   });
 
+  const [showEnablePlugin, setShowEnablePlugin] = useState<boolean>(true);
+  const tabsList = [
+    {
+      title: formatMessage({ id: 'component.plugin.enable' }),
+      key: 'enable',

Review Comment:
   ```suggestion
         key: 'enablePlugins',
   ```



##########
web/src/components/Plugin/PluginPage.tsx:
##########
@@ -104,6 +104,34 @@ const PluginPage: React.FC<Props> = ({
     return index === self.indexOf(elem);
   });
 
+  const [showEnablePlugin, setShowEnablePlugin] = useState<boolean>(true);
+  const tabsList = [
+    {
+      title: formatMessage({ id: 'component.plugin.enable' }),
+      key: 'enable',
+    },
+    {
+      title: formatMessage({ id: 'component.plugin.disable' }),
+      key: 'edit',
+    },
+  ];
+  const SwitchTab = () => (
+    <Tabs
+      defaultActiveKey={showEnablePlugin ? 'enable' : 'edit'}

Review Comment:
   Not a good variable name



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to