import React from 'react'; import Editor from 'components/common/Editor/Editor'; import { SchemaType } from 'generated-sources'; import { StyledWrapper } from './StyledWrapper.styled'; export interface FullMessageProps { data: string; schemaType?: string; maxLines?: number; } const getSchemaValue = (data: string, schemaType?: string) => { if (schemaType === SchemaType.JSON || schemaType === SchemaType.AVRO) { return JSON.stringify(JSON.parse(data), null, '\t'); } return data; }; const EditorViewer: React.FC = ({ data, schemaType, maxLines, }) => { try { return ( ); } catch (e) { return (

{data}

); } }; export default EditorViewer;