Skip to content

Commit

Permalink
refactor: replace <pre> tags with <div> for log body rendering in Log…
Browse files Browse the repository at this point in the history
…sViewer component
  • Loading branch information
simlarsen committed Jan 29, 2025
1 parent 032c03a commit 36a181e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Common/UI/Components/LogsViewer/LogItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const LogItem: FunctionComponent<ComponentProps> = (
)}

<div className={`${bodyColor} courier-prime`}>
{isBodyInJSON && <pre>{logBody}</pre>}
{isBodyInJSON && <div>{logBody}</div>}
{!isBodyInJSON && props.log.body?.toString()}
</div>
</div>
Expand Down Expand Up @@ -215,7 +215,7 @@ const LogItem: FunctionComponent<ComponentProps> = (
)}
</div>
{isBodyInJSON && (
<pre className={`${bodyColor} courier-prime`}>{logBody}</pre>
<div className={`${bodyColor} courier-prime`}>{logBody}</div>
)}
</div>

Expand Down Expand Up @@ -250,13 +250,13 @@ const LogItem: FunctionComponent<ComponentProps> = (
ATTRIBUTES:
</div>
</div>
<pre className={`${bodyColor} courier-prime`}>
<div className={`${bodyColor} courier-prime`}>
{JSON.stringify(
JSONFunctions.unflattenObject(props.log.attributes || {}),
null,
2,
)}
</pre>
</div>
</div>
)}
</div>
Expand Down

0 comments on commit 36a181e

Please sign in to comment.