Changeset View
Changeset View
Standalone View
Standalone View
native/crash.react.js
Show All 28 Lines | |||||
} from 'lib/types/report-types.js'; | } from 'lib/types/report-types.js'; | ||||
import type { PreRequestUserState } from 'lib/types/session-types.js'; | import type { PreRequestUserState } from 'lib/types/session-types.js'; | ||||
import { actionLogger } from 'lib/utils/action-logger.js'; | import { actionLogger } from 'lib/utils/action-logger.js'; | ||||
import { | import { | ||||
type DispatchActionPromise, | type DispatchActionPromise, | ||||
useServerCall, | useServerCall, | ||||
useDispatchActionPromise, | useDispatchActionPromise, | ||||
} from 'lib/utils/action-utils.js'; | } from 'lib/utils/action-utils.js'; | ||||
import { useIsReportEnabled } from 'lib/utils/report-utils.js'; | import { | ||||
generateReportID, | |||||
useIsReportEnabled, | |||||
} from 'lib/utils/report-utils.js'; | |||||
import { | import { | ||||
sanitizeReduxReport, | sanitizeReduxReport, | ||||
type ReduxCrashReport, | type ReduxCrashReport, | ||||
} from 'lib/utils/sanitization.js'; | } from 'lib/utils/sanitization.js'; | ||||
import sleep from 'lib/utils/sleep.js'; | import sleep from 'lib/utils/sleep.js'; | ||||
import Button from './components/button.react.js'; | import Button from './components/button.react.js'; | ||||
import ConnectedStatusBar from './connected-status-bar.react.js'; | import ConnectedStatusBar from './connected-status-bar.react.js'; | ||||
▲ Show 20 Lines • Show All 121 Lines • ▼ Show 20 Lines | const result = await this.props.sendReport({ | ||||
stateVersion: persistConfig.version, | stateVersion: persistConfig.version, | ||||
}, | }, | ||||
errors: this.props.errorData.map(data => ({ | errors: this.props.errorData.map(data => ({ | ||||
errorMessage: data.error.message, | errorMessage: data.error.message, | ||||
stack: data.error.stack, | stack: data.error.stack, | ||||
componentStack: data.info && data.info.componentStack, | componentStack: data.info && data.info.componentStack, | ||||
})), | })), | ||||
...sanitizedReduxReport, | ...sanitizedReduxReport, | ||||
id: generateReportID(), | |||||
}); | }); | ||||
this.setState({ | this.setState({ | ||||
errorReportID: result.id, | errorReportID: result.id, | ||||
doneWaiting: true, | doneWaiting: true, | ||||
}); | }); | ||||
} | } | ||||
onPressKill = () => { | onPressKill = () => { | ||||
▲ Show 20 Lines • Show All 114 Lines • Show Last 20 Lines |