feat(errorboundary): format stack trace properly (#3931)
This commit is contained in:
parent
40b590d75a
commit
0eac386a31
@ -24,8 +24,12 @@ const DefaultFallback = ({ error, context, resetErrorBoundary, fallbackRoute })
|
||||
<p className="text-primary-light text-base">{subtitle}</p>
|
||||
{!isProduction && (
|
||||
<div className="bg-secondary-dark mt-5 space-y-2 rounded-md p-5 font-mono">
|
||||
<p className="text-primary-light">{t('Context')}: {context}</p>
|
||||
<p className="text-primary-light">{t('Error Message')}: {error.message}</p>
|
||||
<p className="text-primary-light">
|
||||
{t('Context')}: {context}
|
||||
</p>
|
||||
<p className="text-primary-light">
|
||||
{t('Error Message')}: {error.message}
|
||||
</p>
|
||||
|
||||
<IconButton
|
||||
variant="contained"
|
||||
@ -44,7 +48,9 @@ const DefaultFallback = ({ error, context, resetErrorBoundary, fallbackRoute })
|
||||
</React.Fragment>
|
||||
</IconButton>
|
||||
|
||||
{showDetails && <p className="text-primary-light px-4">Stack: {error.stack}</p>}
|
||||
{showDetails && (
|
||||
<pre className="text-primary-light whitespace-pre-wrap px-4">Stack: {error.stack}</pre>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@ -53,7 +53,7 @@ const Modal = ({
|
||||
|
||||
return (
|
||||
<ReactModal
|
||||
className="relative max-h-full w-11/12 text-white outline-none lg:w-10/12 xl:w-1/2"
|
||||
className="relative max-h-full w-11/12 text-white outline-none lg:w-10/12 xl:w-9/12"
|
||||
overlayClassName="fixed top-0 left-0 right-0 bottom-0 z-50 bg-overlay flex items-start justify-center py-16"
|
||||
shouldCloseOnEsc={shouldCloseOnEsc}
|
||||
onRequestClose={handleClose}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user