14 lines
479 B
TypeScript
14 lines
479 B
TypeScript
'use client'
|
|
|
|
import type { ReactNode } from 'react'
|
|
import { ErrorBoundary, ObserveProvider } from '@conusai-sdk/observe-react'
|
|
|
|
/** The browser observability root: the SDK instance, and a boundary that reports what React catches. */
|
|
export function Observe({ children }: { children: ReactNode }) {
|
|
return (
|
|
<ObserveProvider>
|
|
<ErrorBoundary fallback={<p>Something went wrong. The error has been reported.</p>}>{children}</ErrorBoundary>
|
|
</ObserveProvider>
|
|
)
|
|
}
|