import React from 'react'; import JSONEditor from 'components/common/JSONEditor/JSONEditor'; import { StyledWrapper } from './StyledWrapper.styled'; export interface FullMessageProps { data: string; maxLines?: number; } const JSONViewer: React.FC = ({ data, maxLines }) => { try { if (data.trim().startsWith('{')) { return ( ); } return (

{JSON.stringify(data)}

); } catch (e) { return (

{data}

); } }; export default JSONViewer;