Skip to content

Commit

Permalink
Merge branch 'antonis/3859-newCaptureFeedbackAPI-Form' into antonis/3…
Browse files Browse the repository at this point in the history
…859-newCaptureFeedbackAPI-Form-logo
  • Loading branch information
antonis committed Dec 12, 2024
2 parents b6953a3 + 1f5fb56 commit d22d660
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/src/js/feedback/FeedbackForm.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { captureFeedback } from '@sentry/core';
import { captureFeedback, lastEventId } from '@sentry/core';
import type { SendFeedbackParams } from '@sentry/types';
import * as React from 'react';
import type { KeyboardTypeOptions } from 'react-native';
Expand Down Expand Up @@ -45,10 +45,12 @@ export class FeedbackForm extends React.Component<FeedbackFormProps, FeedbackFor
return;
}

const eventId = lastEventId();
const userFeedback: SendFeedbackParams = {
message: trimmedDescription,
name: trimmedName,
email: trimmedEmail,
associatedEventId: eventId,
};

onFormClose();
Expand Down
1 change: 1 addition & 0 deletions packages/core/test/feedback/FeedbackForm.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jest.mock('@sentry/core', () => ({
name: 'Test User',
})),
})),
lastEventId: jest.fn(),
}));

const defaultProps: FeedbackFormProps = {
Expand Down

0 comments on commit d22d660

Please sign in to comment.