'use client' import * as Sentry from '@sentry/nextjs' import { useQueryClient } from '@tanstack/react-query' import { type ReactNode } from 'react' import { ErrorBoundary, type FallbackProps } from 'react-error-boundary' import { Button } from '@/components/ui/button' import { useSelectionStore } from '@/lib/stores/selectionStore' function ErrorFallback({ error, resetErrorBoundary }: FallbackProps) { const queryClient = useQueryClient() const errorMessage = error instanceof Error ? error.message : 'Unexpected error' return (

Something went wrong.

{errorMessage}

) } export function AppErrorBoundary({ children }: { children: ReactNode }) { return ( Sentry.captureException(error)} > {children} ) }