juzhiyuan commented on a change in pull request #175: feature: add docker 
support 
URL: 
https://github.com/apache/incubator-apisix-dashboard/pull/175#discussion_r410717620
 
 

 ##########
 File path: src/pages/Settings.tsx
 ##########
 @@ -0,0 +1,81 @@
+import React, {useEffect} from "react";
+import {useForm} from "antd/es/form/util";
+import {Button, Card, Form, Input, notification} from "antd";
+import {formatMessage, FormattedMessage} from "umi-plugin-react/locale";
+import {router} from "umi";
+import {PageHeaderWrapper} from "@ant-design/pro-layout";
+import {getAdminAPI, getAdminAPIKey} from "@/utils/utils";
+
+const layout = {
+  labelCol: {
+    span: 2,
+  },
+  wrapperCol: {
+    span: 8,
+  },
+};
+
+const tailLayout = {
+  wrapperCol: {
+    offset: 2,
+  },
+};
+
+const Settings: React.FC = () => {
+  const [form] = useForm();
+
+  useEffect(() => {
+    form.setFieldsValue({
+      admin_api: getAdminAPI(),
+      admin_api_key: getAdminAPIKey()
+    })
+  });
+
+  const onFinish = (values: any) => {
+    localStorage.setItem('admin_api', values.admin_api);
 
 Review comment:
   Please use global var like `GLOBAL_ADMIN_API` here.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to