-
-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds new feedback button in the sample
- Loading branch information
Showing
2 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import React from 'react'; | ||
import { View, StyleSheet, Text, TextInput, Image, Button } from 'react-native'; | ||
import * as Sentry from '@sentry/react-native'; | ||
import { UserFeedback } from '@sentry/react-native'; | ||
import { SendFeedbackParams, UserFeedback } from '@sentry/react-native'; | ||
|
||
export const DEFAULT_COMMENTS = "It's broken again! Please fix it."; | ||
|
||
|
@@ -48,6 +48,23 @@ export function UserFeedbackModal(props: { onDismiss: () => void }) { | |
}} | ||
/> | ||
<View style={styles.buttonSpacer} /> | ||
<Button | ||
title="Send feedback without event" | ||
color="#6C5FC7" | ||
onPress={async () => { | ||
onDismiss(); | ||
|
||
const userFeedback: SendFeedbackParams = { | ||
message: comments, | ||
name: 'John Doe', | ||
email: '[email protected]', | ||
}; | ||
|
||
Sentry.captureFeedback(userFeedback); | ||
clearComments(); | ||
}} | ||
/> | ||
<View style={styles.buttonSpacer} /> | ||
<Button | ||
title="Close" | ||
color="#6C5FC7" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import React from 'react'; | ||
import { View, StyleSheet, Text, TextInput, Image, Button } from 'react-native'; | ||
import * as Sentry from '@sentry/react-native'; | ||
import { UserFeedback } from '@sentry/react-native'; | ||
import { SendFeedbackParams, UserFeedback } from '@sentry/react-native'; | ||
|
||
export const DEFAULT_COMMENTS = "It's broken again! Please fix it."; | ||
|
||
|
@@ -48,6 +48,23 @@ export function UserFeedbackModal(props: { onDismiss: () => void }) { | |
}} | ||
/> | ||
<View style={styles.buttonSpacer} /> | ||
<Button | ||
title="Send feedback without event" | ||
color="#6C5FC7" | ||
onPress={async () => { | ||
onDismiss(); | ||
|
||
const userFeedback: SendFeedbackParams = { | ||
message: comments, | ||
name: 'John Doe', | ||
email: '[email protected]', | ||
}; | ||
|
||
Sentry.captureFeedback(userFeedback); | ||
clearComments(); | ||
}} | ||
/> | ||
<View style={styles.buttonSpacer} /> | ||
<Button | ||
title="Close" | ||
color="#6C5FC7" | ||
|