refactor(ErrorBlock): simplify CodeViewer component usage

- Removed unnecessary props from CodeViewer in ErrorBlock for cleaner code and improved readability.
This commit is contained in:
MyPrototypeWhat 2025-09-03 17:18:34 +08:00
parent 01c4777691
commit 7f87fb9c26

View File

@ -164,12 +164,7 @@ ${t('error.stack')}: ${error.stack || 'N/A'}
{error.requestBody && (
<ErrorDetailItem>
<ErrorDetailLabel>{t('error.requestBody')}:</ErrorDetailLabel>
<CodeViewer
className="source-view"
language="json"
expanded={true}
// unwrapped={true}
>
<CodeViewer className="source-view" language="json" expanded>
{JSON.stringify(error.requestBody, null, 2)}
</CodeViewer>
</ErrorDetailItem>