@ -10,12 +10,10 @@ import hardReset from 'helpers/hardReset'
import type { T } from 'types/common'
import type { T } from 'types/common'
import Spoiler from 'components/base/Spoiler'
import ExportLogsBtn from 'components/ExportLogsBtn'
import ExportLogsBtn from 'components/ExportLogsBtn'
import Box from 'components/base/Box'
import Box from 'components/base/Box'
import Space from 'components/base/Space'
import Space from 'components/base/Space'
import Button from 'components/base/Button'
import Button from 'components/base/Button'
import TranslatedError from './TranslatedError'
type Props = {
type Props = {
error : Error ,
error : Error ,
@ -94,17 +92,23 @@ ${error.stack}
{ t ( 'app:crash.reset' ) }
{ t ( 'app:crash.reset' ) }
< / B u t t o n >
< / B u t t o n >
< / B o x >
< / B o x >
< Space of = { 20 } / >
< Box my = { 6 } >
< Spoiler color = "wallet" title = { t ( 'app:crash.showError' ) } >
< ErrContainer >
< ErrContainer >
< TranslatedError error = { error } / >
< strong > { String ( error ) } < / s t r o n g >
< div > { error . stack || 'no stacktrace' } < / d i v >
< / E r r C o n t a i n e r >
< / E r r C o n t a i n e r >
< / S p o i l e r >
< / B o x >
< Space of = { 10 } / >
< pre
< Spoiler color = "wallet" title = { t ( 'app:crash.showDetails' ) } >
style = { {
< ErrContainer > { error . stack } < / E r r C o n t a i n e r >
position : 'fixed' ,
< / S p o i l e r >
bottom : 8 ,
< Space of = { 100 } / >
left : 8 ,
opacity : 0.2 ,
fontSize : 10 ,
} }
>
{ __ APP_VERSION__ }
< / p r e >
{ children }
{ children }
< / B o x >
< / B o x >
)
)
@ -114,14 +118,14 @@ ${error.stack}
const ErrContainer = ( { children } : { children : any } ) => (
const ErrContainer = ( { children } : { children : any } ) => (
< pre
< pre
style = { {
style = { {
marginTop : 10 ,
margin : 'auto' ,
maxWidth : '80% ' ,
maxWidth : '80vw ' ,
overflow : 'auto' ,
overflow : 'auto' ,
fontSize : 10 ,
fontSize : 10 ,
fontFamily : 'monospace' ,
fontFamily : 'monospace' ,
background : 'rgba(0, 0, 0, 0.05)' ,
cursor : 'text' ,
cursor : 'text' ,
userSelect : 'text' ,
userSelect : 'text' ,
opacity : 0.3 ,
} }
} }
>
>
{ children }
{ children }