Skip to content

Commit 7556c65

Browse files
committed
Removing Redundant Comment
1 parent 1f12fc9 commit 7556c65

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

examples/default/src/screens/CrashReportingScreen.tsx

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
import React, { useState } from 'react';
2-
import {
3-
Alert,
4-
Platform,
5-
ScrollView,
6-
StyleSheet,
7-
Text,
8-
View,
9-
Switch,
10-
ToastAndroid,
11-
} from 'react-native';
2+
import { Alert, Platform, ScrollView, StyleSheet, Text, View, Switch } from 'react-native';
123

134
import { CrashReporting, NonFatalErrorLevel } from 'instabug-reactnative';
145

@@ -21,6 +12,7 @@ import { VerticalListTile } from '../components/VerticalListTile';
2112
import { Button, VStack } from 'native-base';
2213
import { InputField } from '../components/InputField';
2314
import { Select } from '../components/Select';
15+
import { showNotification } from '../utils/showNotification';
2416

2517
const styles = StyleSheet.create({
2618
inputWrapper: {
@@ -82,16 +74,8 @@ export const CrashReportingScreen: React.FC = () => {
8274

8375
const toggleSwitch = (value: boolean) => {
8476
setIsEnabled(value);
85-
86-
// Update APM state here
8777
CrashReporting.setEnabled(value);
88-
// Show Toast message
89-
90-
if (Platform.OS === 'android') {
91-
ToastAndroid.show('Crash Reporting set to ' + value, ToastAndroid.SHORT);
92-
} else {
93-
Alert.alert('Crash Reporting set to ' + value);
94-
}
78+
showNotification('Crash Reporting status', 'Crash Reporting enabled set to ' + value);
9579
};
9680

9781
function sendCrash() {

0 commit comments

Comments
 (0)