You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ju...@apache.org on 2020/06/01 10:34:30 UTC

[incubator-apisix-dashboard] branch fix-routes updated: codes clean

This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch fix-routes
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-dashboard.git


The following commit(s) were added to refs/heads/fix-routes by this push:
     new b847005  codes clean
b847005 is described below

commit b8470053b5f9ec1cc5a486b5d2436e8e42bb731e
Author: juzhiyuan <jj...@gmail.com>
AuthorDate: Mon Jun 1 18:34:06 2020 +0800

    codes clean
---
 src/pages/Routes/components/Step1/RequestConfigView.tsx | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/pages/Routes/components/Step1/RequestConfigView.tsx b/src/pages/Routes/components/Step1/RequestConfigView.tsx
index 7112110..359d44a 100644
--- a/src/pages/Routes/components/Step1/RequestConfigView.tsx
+++ b/src/pages/Routes/components/Step1/RequestConfigView.tsx
@@ -45,12 +45,6 @@ const RequestConfigView: React.FC<Props> = ({ data, form, onChange }) => {
     });
   };
 
-  const addHost = () => {
-    onChange({
-      hosts: hosts.concat(''),
-    });
-  };
-
   const renderHosts = () =>
     hosts.map((item, index) => (
       <Row key={`${item + index}`} style={{ marginBottom: '10px' }} gutter={[16, 16]}>
@@ -118,7 +112,7 @@ const RequestConfigView: React.FC<Props> = ({ data, form, onChange }) => {
         {/* TODO: name */}
         <Form.Item label="HOST" rules={[{ required: true, message: '请输入 HOST' }]}>
           {renderHosts()}
-          <Button type="primary" onClick={addHost}>
+          <Button type="primary" onClick={() => onChange({ hosts: hosts.concat('') })}>
             增加
           </Button>
         </Form.Item>