LiteSun commented on a change in pull request #1601:
URL: https://github.com/apache/apisix-dashboard/pull/1601#discussion_r598237750



##########
File path: web/src/components/RawDataEditor/RawDataEditor.tsx
##########
@@ -14,24 +14,97 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import React, { useRef } from 'react';
-import { Button, Drawer, PageHeader, Tooltip, notification } from 'antd';
+import React, { useEffect, useRef, useState } from 'react';
+import { Button, Drawer, PageHeader, notification, Space, Select } from 'antd';
 import { LinkOutlined } from '@ant-design/icons';
 import CodeMirror from '@uiw/react-codemirror';
 import { CopyToClipboard } from 'react-copy-to-clipboard';
 import { useIntl } from 'umi';
+import { js_beautify } from 'js-beautify';
+
+import { json2yaml, yaml2json } from '../../helpers';
 
 type Props = {
   visible: boolean,
   readonly: boolean,
   type: 'route' | 'service' | 'consumer' | 'upstream'
   data: Record<string, any>,
   onClose?: () => void;
+  onSubmit?: (data: Record<string, any>) => void;
 };
 
-const RawDataEditor: React.FC<Props> = ({ visible, readonly = true, type, data 
= {}, onClose }) => {
+enum codeMirrorModeList {
+  Json = 'Json',
+  Yaml = 'Yaml',
+}
+
+const RawDataEditor: React.FC<Props> = ({ visible, readonly = true, type, data 
= {}, onClose = () => { }, onSubmit = () => { } }) => {

Review comment:
        format required.




-- 
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


Reply via email to