Skip to content

Commit

Permalink
Merge pull request #29 from yiisoft/ssr-panel
Browse files Browse the repository at this point in the history
Support SSR panels
  • Loading branch information
xepozz authored Mar 22, 2023
2 parents 9c21c2a + 3eefcf2 commit eb09bbf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Module/Debug/Pages/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,14 @@ function CollectorData({collectorData, selectedCollector}: CollectorDataProps) {
[CollectorsMap.MiddlewareCollector]: (data: any) => <MiddlewarePanel {...data} />,
[CollectorsMap.EventCollector]: (data: any) => <EventPanel events={data} />,
[CollectorsMap.ExceptionCollector]: (data: any) => <ExceptionPanel exceptions={data} />,
default: (data: any) => <DumpPage data={data} />,
default: (data: any) => {
try {
JSON.parse(data);
} catch (e) {
return <Box dangerouslySetInnerHTML={{__html: data}} />;
}
return <DumpPage data={data} />;
},
};

if (selectedCollector === '') {
Expand Down

0 comments on commit eb09bbf

Please sign in to comment.