import React from 'react'; import { JSONTree } from 'UI'; import cn from 'classnames'; import { withTranslation } from 'react-i18next'; class GQLDetails extends React.PureComponent { render() { const { gql: { variables, response, duration, operationKind, operationName }, first = false, last = false, t, } = this.props; let jsonVars; let jsonResponse; try { jsonVars = JSON.parse(variables); } catch (e) {} try { jsonResponse = JSON.parse(response); } catch (e) {} const dataClass = cn('p-2 bg-gray-lightest rounded color-gray-darkest'); return (