Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/browser
SDK Version
@sentry/nextjs 7.105.0
Framework Version
18.2.0
Link to Sentry event
No response
SDK Setup
import * as Sentry from '@sentry/nextjs';
const feedback = Sentry.feedbackIntegration({
autoInject: false,
colorScheme: 'light',
buttonLabel: 'Give Feedback',
messagePlaceholder: '',
submitButtonLabel: 'Send Feedback',
formTitle: 'Give Feedback',
showBranding: false,
isEmailRequired: false,
submitBackground: 'rgba(72, 16, 193, 1)',
submitBackgroundHover: 'rgb(172, 152, 254, 1)',
submitBorder: 'rgb(172, 152, 254, 1)',
fontFamily: 'Inter',
showEmail: false,
showName: false,
});
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
ignoreErrors: ['ResizeObserver loop completed with undelivered notifications'],
integrations: [feedback],
});
### Steps to Reproduce
Create a custom component as per the documentation (doc is not up to date with latest change of interface from the SDK)
```jsx
import { BrowserClient, getClient } from '@sentry/react';
const SentryFeedbackButton = () => {
const client = getClient<BrowserClient>();
const feedback = client?.getIntegrationByName('Feedback');
if (!feedback) {
return null;
}
return(
<button type="button" onClick={() => feedback.openDialog()}>
Give me feedback
</button>,
);
};
export default SentryFeedbackButton;
Expected Result
- The documentation should be up to date.
- The method
getIntegrationByName
should return the appropriateIntegration
type with its own methods defined.
Actual Result
Not sure how to import the type FeedbackWidget
.
The error are:
Property 'return' does not exist on type 'Integration'.
Property 'openDialog' does not exist on type 'Integration'.
Metadata
Metadata
Assignees
Type
Projects
Status
No status