1
1
import React , { useState } from 'react' ;
2
- import { Alert , Platform , ScrollView , StyleSheet , Text , View , Switch } from 'react-native' ;
2
+ import { Alert , Platform , ScrollView , StyleSheet , Text , View } from 'react-native' ;
3
3
4
4
import { CrashReporting , NonFatalErrorLevel } from 'instabug-reactnative' ;
5
5
@@ -12,7 +12,6 @@ import { VerticalListTile } from '../components/VerticalListTile';
12
12
import { Button , VStack } from 'native-base' ;
13
13
import { InputField } from '../components/InputField' ;
14
14
import { Select } from '../components/Select' ;
15
- import { showNotification } from '../utils/showNotification' ;
16
15
17
16
const styles = StyleSheet . create ( {
18
17
inputWrapper : {
@@ -62,7 +61,6 @@ export const CrashReportingScreen: React.FC = () => {
62
61
throw error ;
63
62
}
64
63
}
65
- const [ isEnabled , setIsEnabled ] = useState ( false ) ;
66
64
67
65
const [ userAttributeKey , setUserAttributeKey ] = useState ( '' ) ;
68
66
const [ userAttributeValue , setUserAttributeValue ] = useState ( '' ) ;
@@ -72,12 +70,6 @@ export const CrashReportingScreen: React.FC = () => {
72
70
NonFatalErrorLevel . error ,
73
71
) ;
74
72
75
- const toggleSwitch = ( value : boolean ) => {
76
- setIsEnabled ( value ) ;
77
- CrashReporting . setEnabled ( value ) ;
78
- showNotification ( 'Crash Reporting status' , 'Crash Reporting enabled set to ' + value ) ;
79
- } ;
80
-
81
73
function sendCrash ( ) {
82
74
try {
83
75
const error = new Error ( crashNameValue ) ;
@@ -107,8 +99,6 @@ export const CrashReportingScreen: React.FC = () => {
107
99
108
100
return (
109
101
< Screen >
110
- < Text > Crash Reporting Enabled:</ Text >
111
- < Switch onValueChange = { toggleSwitch } value = { isEnabled } />
112
102
< ScrollView >
113
103
< Section title = "Non-Fatals" >
114
104
< ListTile
0 commit comments