Skip to content

Commit

Permalink
Merge 70ce204 into 6c56eb1
Browse files Browse the repository at this point in the history
  • Loading branch information
antonis authored Dec 2, 2024
2 parents 6c56eb1 + 70ce204 commit 1f082ae
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@
email: "[email protected]",
message: "Hello World!",
associatedEventId: eventId, // optional
}, {
captureContext: {
tags: { "tag-key": "tag-value" },
},
attachments: [
{
filename: "screenshot.png",
data: "base64-encoded-image",
},
],
});
```

Expand Down
27 changes: 27 additions & 0 deletions samples/react-native-macos/src/components/UserFeedbackModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,33 @@ export function UserFeedbackModal(props: { onDismiss: () => void }) {
}}
/>
<View style={styles.buttonSpacer} />
<Button
title="Send feedback with attachment and tags"
color="#6C5FC7"
onPress={async () => {
onDismiss();

const userFeedback: SendFeedbackParams = {
message: comments,
name: 'John Doe',
email: '[email protected]',
};

Sentry.captureFeedback(userFeedback, {
captureContext: {
tags: { testtag: 'testvalue' },
},
attachments: [
{
filename: 'hello.txt',
data: 'Hello, World!',
},
],
});
clearComments();
}}
/>
<View style={styles.buttonSpacer} />
<Button
title="Close"
color="#6C5FC7"
Expand Down
27 changes: 27 additions & 0 deletions samples/react-native/src/components/UserFeedbackModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,33 @@ export function UserFeedbackModal(props: { onDismiss: () => void }) {
}}
/>
<View style={styles.buttonSpacer} />
<Button
title="Send feedback with attachment and tags"
color="#6C5FC7"
onPress={async () => {
onDismiss();

const userFeedback: SendFeedbackParams = {
message: comments,
name: 'John Doe',
email: '[email protected]',
};

Sentry.captureFeedback(userFeedback, {
captureContext: {
tags: { testtag: 'testvalue' },
},
attachments: [
{
filename: 'hello.txt',
data: 'Hello, World!',
},
],
});
clearComments();
}}
/>
<View style={styles.buttonSpacer} />
<Button
title="Close"
color="#6C5FC7"
Expand Down

0 comments on commit 1f082ae

Please sign in to comment.