diff --git a/frontend/app/components/Session_/OverviewPanel/components/StackEventModal/components/JsonViewer/JsonViewer.js b/frontend/app/components/Session_/OverviewPanel/components/StackEventModal/components/JsonViewer/JsonViewer.js index 985191896..e20b9ba8d 100644 --- a/frontend/app/components/Session_/OverviewPanel/components/StackEventModal/components/JsonViewer/JsonViewer.js +++ b/frontend/app/components/Session_/OverviewPanel/components/StackEventModal/components/JsonViewer/JsonViewer.js @@ -4,11 +4,12 @@ import { Icon, JSONTree } from 'UI'; export default class JsonViewer extends React.PureComponent { render() { const { data, title, icon } = this.props; + const isObjectData = typeof data === 'object' && !Array.isArray(data) && data !== null return (

{title}

- + {isObjectData ? : data}
); } diff --git a/frontend/app/components/Session_/StackEvents/StackEvents.js b/frontend/app/components/Session_/StackEvents/StackEvents.js index f4a9387d6..4ce3ce86c 100644 --- a/frontend/app/components/Session_/StackEvents/StackEvents.js +++ b/frontend/app/components/Session_/StackEvents/StackEvents.js @@ -47,7 +47,6 @@ export default class StackEvents extends React.PureComponent { } renderPopupContent(userEvent) { - console.log('event', userEvent); const { source, payload, name } = userEvent; switch (source) { case SENTRY: diff --git a/frontend/app/components/Session_/StackEvents/UserEvent/JsonViewer.js b/frontend/app/components/Session_/StackEvents/UserEvent/JsonViewer.js index ec4a5288d..9b29dfd35 100644 --- a/frontend/app/components/Session_/StackEvents/UserEvent/JsonViewer.js +++ b/frontend/app/components/Session_/StackEvents/UserEvent/JsonViewer.js @@ -2,14 +2,24 @@ import React from 'react'; import { Icon, JSONTree } from 'UI'; export default class JsonViewer extends React.PureComponent { - render() { - const { data, title, icon } = this.props; - return ( -
- -

{ title }

- -
- ); - } -} \ No newline at end of file + render() { + const { data, title, icon } = this.props; + const isObjectData = typeof data === 'object' && !Array.isArray(data) && data !== null; + return ( +
+
+ +

{title}

+
+ {isObjectData ? ( + + ) : ( + <> +
Payload:
+
{data}
+ + )} +
+ ); + } +} diff --git a/frontend/app/components/Session_/tabs.js b/frontend/app/components/Session_/tabs.js deleted file mode 100644 index 4eddc27e2..000000000 --- a/frontend/app/components/Session_/tabs.js +++ /dev/null @@ -1,49 +0,0 @@ -import { - NONE, - CONSOLE, - NETWORK, - STACKEVENTS, - STORAGE, - PROFILER, - PERFORMANCE, - GRAPHQL, - FETCH, - EXCEPTIONS, - LONGTASKS, -} from 'Duck/components/player'; - -import Network from './Network'; -import Console from './Console/Console'; -import StackEvents from './StackEvents/StackEvents'; -import Storage from './Storage'; -import Profiler from './Profiler'; -import Performance from './Performance'; -import PlayerBlockHeader from './PlayerBlockHeader'; -import GraphQL from './GraphQL'; -import Fetch from './Fetch'; -import Exceptions from './Exceptions/Exceptions'; -import LongTasks from './LongTasks'; - - -// const tabs = [ -// { -// key: CONSOLE, -// Component: Console, -// }, -// { -// key: NETWORK, -// Component: Network, -// }, -// { -// key: STORAGE, -// Component: -// } -// ] - -const tabsByKey = {}; -// tabs.map() - - -export function switchTab(tabKey) { - tabKey -}