Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions instrumentation-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import * as Sentry from "@sentry/nextjs";
import dsn from "./sentry.shared.dsn";
import { EventHint } from "@sentry/nextjs";
import { ErrorEvent, EventHint } from "@sentry/nextjs";

Sentry.init({
dsn,
Expand All @@ -23,7 +23,7 @@ Sentry.init({

replaysSessionSampleRate: 1.0,

beforeSend(event, hint: EventHint) {
beforeSend(event: ErrorEvent, hint: EventHint) {
// Check if it is an exception, and if so, show the report dialog
if (event.exception && event.event_id && hint.data?.useCrashReport) {
Sentry.showReportDialog({ eventId: event.event_id });
Expand Down
2 changes: 1 addition & 1 deletion src/components/FeedbackButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useRef } from "react";
import useFeedbackWidget from "./useFeedbackWidget";

export default function FeedbackButton() {
const buttonRef = useRef<HTMLButtonElement>(null);
const buttonRef = useRef<HTMLButtonElement | null>(null);
useFeedbackWidget({buttonRef, options: {
tags: {
component: 'FeedbackButton'
Expand Down
2 changes: 1 addition & 1 deletion src/components/useFeedbackWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {useEffect, useState} from 'react';
import * as Sentry from '@sentry/nextjs';

interface Props {
buttonRef?: RefObject<HTMLButtonElement> | RefObject<HTMLAnchorElement>;
buttonRef?: RefObject<HTMLButtonElement | null> | RefObject<HTMLAnchorElement | null>;
options?: {
tags?: Record<string, string>
},
Expand Down