oil-oil commented on code in PR #2585:
URL: https://github.com/apache/apisix-dashboard/pull/2585#discussion_r948606317
##########
web/src/components/Plugin/PluginPage.tsx:
##########
@@ -66,6 +66,8 @@ const PluginPage: React.FC<Props> = ({
const { formatMessage } = useIntl();
const [form] = Form.useForm();
const [pluginList, setPluginList] = useState<PluginComponent.Meta[]>([]);
+ const [enablePluginsList, setEnablePluginsList] =
useState<PluginComponent.Meta[]>([]);
+ const [showEnablePlugin, setShowEnablePlugin] = useState<boolean>(false);
Review Comment:
```suggestion
const [showEnablePlugin, setShowEnablePlugin] = useState(false);
```
##########
web/src/components/Plugin/PluginPage.tsx:
##########
@@ -66,6 +66,8 @@ const PluginPage: React.FC<Props> = ({
const { formatMessage } = useIntl();
const [form] = Form.useForm();
const [pluginList, setPluginList] = useState<PluginComponent.Meta[]>([]);
+ const [enablePluginsList, setEnablePluginsList] =
useState<PluginComponent.Meta[]>([]);
Review Comment:
enablePluginsList can be obtained from the `pluginList` after calculation,
no need to define a new state.
--
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]