File tree Expand file tree Collapse file tree 15 files changed +285
-24
lines changed
blocknote-xl-commercial-license Expand file tree Collapse file tree 15 files changed +285
-24
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,30 @@ import type { ReactNode } from "react";
22import { HomeLayout } from "fumadocs-ui/layouts/home" ;
33import { baseOptions } from "@/app/layout.config" ;
44import { Footer } from "@/components/Footer" ;
5+ import * as Sentry from "@sentry/nextjs" ;
56
67export default function Layout ( { children } : { children : ReactNode } ) {
78 return (
89 < >
9- < HomeLayout { ...baseOptions } > { children } </ HomeLayout >
10+ < HomeLayout { ...baseOptions } >
11+ < Sentry . ErrorBoundary
12+ fallback = {
13+ < div >
14+ We encountered an error trying to show this page. Please report
15+ this to us on GitHub at{ " " }
16+ < a href = "https://github.com/TypeCellOS/BlockNote/issues" >
17+ https://github.com/TypeCellOS/BlockNote/issues
18+ </ a >
19+ </ div >
20+ }
21+ beforeCapture = { ( scope ) => {
22+ scope . setTag ( "type" , "react-render" ) ;
23+ scope . setTag ( "page" , "home" ) ;
24+ } }
25+ >
26+ { children }
27+ </ Sentry . ErrorBoundary >
28+ </ HomeLayout >
1029 < Footer />
1130 </ >
1231 ) ;
Original file line number Diff line number Diff line change @@ -2,11 +2,30 @@ import { HomeLayout } from "fumadocs-ui/layouts/home";
22import type { ReactNode } from "react" ;
33import { baseOptions } from "@/app/layout.config" ;
44import { Footer } from "@/components/Footer" ;
5+ import * as Sentry from "@sentry/nextjs" ;
56
67export default function Layout ( { children } : { children : ReactNode } ) {
78 return (
89 < >
9- < HomeLayout { ...baseOptions } > { children } </ HomeLayout >
10+ < HomeLayout { ...baseOptions } >
11+ < Sentry . ErrorBoundary
12+ fallback = {
13+ < div >
14+ We encountered an error trying to show this page. Please report
15+ this to us on GitHub at{ " " }
16+ < a href = "https://github.com/TypeCellOS/BlockNote/issues" >
17+ https://github.com/TypeCellOS/BlockNote/issues
18+ </ a >
19+ </ div >
20+ }
21+ beforeCapture = { ( scope ) => {
22+ scope . setTag ( "type" , "react-render" ) ;
23+ scope . setTag ( "page" , "about" ) ;
24+ } }
25+ >
26+ { children }
27+ </ Sentry . ErrorBoundary >
28+ </ HomeLayout >
1029 < Footer />
1130 </ >
1231 ) ;
Original file line number Diff line number Diff line change @@ -4,12 +4,29 @@ import { baseOptions } from "@/app/layout.config";
44import { CustomDocsLayout } from "@/components/CustomDocsLayout" ;
55import { Footer } from "@/components/Footer" ;
66import { source } from "@/lib/source/docs" ;
7+ import * as Sentry from "@sentry/nextjs" ;
78
89export default function Layout ( { children } : { children : ReactNode } ) {
910 return (
1011 < >
1112 < CustomDocsLayout tree = { source . pageTree } { ...baseOptions } >
12- { children }
13+ < Sentry . ErrorBoundary
14+ fallback = {
15+ < div >
16+ We encountered an error trying to show this page. Please report
17+ this to us on GitHub at{ " " }
18+ < a href = "https://github.com/TypeCellOS/BlockNote/issues" >
19+ https://github.com/TypeCellOS/BlockNote/issues
20+ </ a >
21+ </ div >
22+ }
23+ beforeCapture = { ( scope ) => {
24+ scope . setTag ( "type" , "react-render" ) ;
25+ scope . setTag ( "page" , "docs" ) ;
26+ } }
27+ >
28+ { children }
29+ </ Sentry . ErrorBoundary >
1330 </ CustomDocsLayout >
1431 < Footer />
1532 < Analytics />
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { Footer } from "@/components/Footer";
66import { ProBadge } from "@/components/ProBadge" ;
77import { source } from "@/lib/source/examples" ;
88import { getExampleData } from "@/util/getExampleData" ;
9+ import * as Sentry from "@sentry/nextjs" ;
910
1011export default function Layout ( { children } : { children : ReactNode } ) {
1112 // Add Pro badges to example pages in sidebar.
@@ -34,7 +35,23 @@ export default function Layout({ children }: { children: ReactNode }) {
3435 return (
3536 < >
3637 < CustomDocsLayout tree = { source . pageTree } { ...baseOptions } >
37- { children }
38+ < Sentry . ErrorBoundary
39+ fallback = {
40+ < div >
41+ We encountered an error trying to show this page. Please report
42+ this to us on GitHub at{ " " }
43+ < a href = "https://github.com/TypeCellOS/BlockNote/issues" >
44+ https://github.com/TypeCellOS/BlockNote/issues
45+ </ a >
46+ </ div >
47+ }
48+ beforeCapture = { ( scope ) => {
49+ scope . setTag ( "type" , "react-render" ) ;
50+ scope . setTag ( "page" , "examples" ) ;
51+ } }
52+ >
53+ { children }
54+ </ Sentry . ErrorBoundary >
3855 </ CustomDocsLayout >
3956 < Footer />
4057 < Analytics />
Original file line number Diff line number Diff line change @@ -4,9 +4,13 @@ import * as Sentry from "@sentry/nextjs";
44import NextError from "next/error" ;
55import { useEffect } from "react" ;
66
7- export default function GlobalError ( { error } : { error : Error & { digest ?: string } } ) {
7+ export default function GlobalError ( {
8+ error,
9+ } : {
10+ error : Error & { digest ?: string } ;
11+ } ) {
812 useEffect ( ( ) => {
9- Sentry . captureException ( error ) ;
13+ Sentry . captureException ( error , { tags : { type : "react-render" } } ) ;
1014 } , [ error ] ) ;
1115
1216 return (
@@ -20,4 +24,4 @@ export default function GlobalError({ error }: { error: Error & { digest?: strin
2024 </ body >
2125 </ html >
2226 ) ;
23- }
27+ }
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { RootProvider } from "fumadocs-ui/provider";
33import { Analytics } from "@vercel/analytics/react" ;
44import { Metadata } from "next" ;
55import type { ReactNode } from "react" ;
6+ import * as Sentry from "@sentry/nextjs" ;
67
78import { getFullMetadata } from "@/util/getFullMetadata" ;
89
@@ -29,7 +30,22 @@ export default function Layout({ children }: { children: ReactNode }) {
2930 Access the early preview.
3031 </ a >
3132 </ Banner >
32- < RootProvider > { children as any } </ RootProvider >
33+ < Sentry . ErrorBoundary
34+ fallback = {
35+ < div >
36+ We encountered an error trying to show this page. Please report
37+ this to us on GitHub at{ " " }
38+ < a href = "https://github.com/TypeCellOS/BlockNote/issues" >
39+ https://github.com/TypeCellOS/BlockNote/issues
40+ </ a >
41+ </ div >
42+ }
43+ beforeCapture = { ( scope ) => {
44+ scope . setTag ( "type" , "react-render" ) ;
45+ } }
46+ >
47+ < RootProvider > { children } </ RootProvider >
48+ </ Sentry . ErrorBoundary >
3349 < Analytics />
3450 </ body >
3551 </ html >
Original file line number Diff line number Diff line change @@ -2,11 +2,30 @@ import { HomeLayout } from "fumadocs-ui/layouts/home";
22import type { ReactNode } from "react" ;
33import { baseOptions } from "@/app/layout.config" ;
44import { Footer } from "@/components/Footer" ;
5+ import * as Sentry from "@sentry/nextjs" ;
56
67export default function Layout ( { children } : { children : ReactNode } ) {
78 return (
89 < >
9- < HomeLayout { ...baseOptions } > { children } </ HomeLayout >
10+ < HomeLayout { ...baseOptions } >
11+ < Sentry . ErrorBoundary
12+ fallback = {
13+ < div >
14+ We encountered an error trying to show this page. Please report
15+ this to us on GitHub at{ " " }
16+ < a href = "https://github.com/TypeCellOS/BlockNote/issues" >
17+ https://github.com/TypeCellOS/BlockNote/issues
18+ </ a >
19+ </ div >
20+ }
21+ beforeCapture = { ( scope ) => {
22+ scope . setTag ( "type" , "react-render" ) ;
23+ scope . setTag ( "page" , "legal/blocknote-xl-commercial-license" ) ;
24+ } }
25+ >
26+ { children }
27+ </ Sentry . ErrorBoundary >
28+ </ HomeLayout >
1029 < Footer />
1130 </ >
1231 ) ;
Original file line number Diff line number Diff line change @@ -2,11 +2,30 @@ import { HomeLayout } from "fumadocs-ui/layouts/home";
22import type { ReactNode } from "react" ;
33import { baseOptions } from "@/app/layout.config" ;
44import { Footer } from "@/components/Footer" ;
5+ import * as Sentry from "@sentry/nextjs" ;
56
67export default function Layout ( { children } : { children : ReactNode } ) {
78 return (
89 < >
9- < HomeLayout { ...baseOptions } > { children } </ HomeLayout >
10+ < HomeLayout { ...baseOptions } >
11+ < Sentry . ErrorBoundary
12+ fallback = {
13+ < div >
14+ We encountered an error trying to show this page. Please report
15+ this to us on GitHub at{ " " }
16+ < a href = "https://github.com/TypeCellOS/BlockNote/issues" >
17+ https://github.com/TypeCellOS/BlockNote/issues
18+ </ a >
19+ </ div >
20+ }
21+ beforeCapture = { ( scope ) => {
22+ scope . setTag ( "type" , "react-render" ) ;
23+ scope . setTag ( "page" , "legal/privacy-policy" ) ;
24+ } }
25+ >
26+ { children }
27+ </ Sentry . ErrorBoundary >
28+ </ HomeLayout >
1029 < Footer />
1130 </ >
1231 ) ;
Original file line number Diff line number Diff line change @@ -2,11 +2,30 @@ import { HomeLayout } from "fumadocs-ui/layouts/home";
22import type { ReactNode } from "react" ;
33import { baseOptions } from "@/app/layout.config" ;
44import { Footer } from "@/components/Footer" ;
5+ import * as Sentry from "@sentry/nextjs" ;
56
67export default function Layout ( { children } : { children : ReactNode } ) {
78 return (
89 < >
9- < HomeLayout { ...baseOptions } > { children } </ HomeLayout >
10+ < HomeLayout { ...baseOptions } >
11+ < Sentry . ErrorBoundary
12+ fallback = {
13+ < div >
14+ We encountered an error trying to show this page. Please report
15+ this to us on GitHub at{ " " }
16+ < a href = "https://github.com/TypeCellOS/BlockNote/issues" >
17+ https://github.com/TypeCellOS/BlockNote/issues
18+ </ a >
19+ </ div >
20+ }
21+ beforeCapture = { ( scope ) => {
22+ scope . setTag ( "type" , "react-render" ) ;
23+ scope . setTag ( "page" , "legal/service-level-agreement" ) ;
24+ } }
25+ >
26+ { children }
27+ </ Sentry . ErrorBoundary >
28+ </ HomeLayout >
1029 < Footer />
1130 </ >
1231 ) ;
Original file line number Diff line number Diff line change @@ -2,11 +2,30 @@ import { HomeLayout } from "fumadocs-ui/layouts/home";
22import type { ReactNode } from "react" ;
33import { baseOptions } from "@/app/layout.config" ;
44import { Footer } from "@/components/Footer" ;
5+ import * as Sentry from "@sentry/nextjs" ;
56
67export default function Layout ( { children } : { children : ReactNode } ) {
78 return (
89 < >
9- < HomeLayout { ...baseOptions } > { children } </ HomeLayout >
10+ < HomeLayout { ...baseOptions } >
11+ < Sentry . ErrorBoundary
12+ fallback = {
13+ < div >
14+ We encountered an error trying to show this page. Please report
15+ this to us on GitHub at{ " " }
16+ < a href = "https://github.com/TypeCellOS/BlockNote/issues" >
17+ https://github.com/TypeCellOS/BlockNote/issues
18+ </ a >
19+ </ div >
20+ }
21+ beforeCapture = { ( scope ) => {
22+ scope . setTag ( "type" , "react-render" ) ;
23+ scope . setTag ( "page" , "legal/terms-and-conditions" ) ;
24+ } }
25+ >
26+ { children }
27+ </ Sentry . ErrorBoundary >
28+ </ HomeLayout >
1029 < Footer />
1130 </ >
1231 ) ;
You can’t perform that action at this time.
0 commit comments