diff --git a/docs/app/(home)/layout.tsx b/docs/app/(home)/layout.tsx
index 235258e8c5..1cdb476017 100644
--- a/docs/app/(home)/layout.tsx
+++ b/docs/app/(home)/layout.tsx
@@ -2,11 +2,30 @@ import type { ReactNode } from "react";
import { HomeLayout } from "fumadocs-ui/layouts/home";
import { baseOptions } from "@/app/layout.config";
import { Footer } from "@/components/Footer";
+import * as Sentry from "@sentry/nextjs";
export default function Layout({ children }: { children: ReactNode }) {
return (
<>
- {children}
+
+
+ We encountered an error trying to show this page. Please report
+ this to us on GitHub at{" "}
+
+ https://github.com/TypeCellOS/BlockNote/issues
+
+
+ }
+ beforeCapture={(scope) => {
+ scope.setTag("type", "react-render");
+ scope.setTag("page", "home");
+ }}
+ >
+ {children}
+
+
>
);
diff --git a/docs/app/about/layout.tsx b/docs/app/about/layout.tsx
index 8bd5d635ce..cdbd096704 100644
--- a/docs/app/about/layout.tsx
+++ b/docs/app/about/layout.tsx
@@ -2,11 +2,30 @@ import { HomeLayout } from "fumadocs-ui/layouts/home";
import type { ReactNode } from "react";
import { baseOptions } from "@/app/layout.config";
import { Footer } from "@/components/Footer";
+import * as Sentry from "@sentry/nextjs";
export default function Layout({ children }: { children: ReactNode }) {
return (
<>
- {children}
+
+
+ We encountered an error trying to show this page. Please report
+ this to us on GitHub at{" "}
+
+ https://github.com/TypeCellOS/BlockNote/issues
+
+
+ }
+ beforeCapture={(scope) => {
+ scope.setTag("type", "react-render");
+ scope.setTag("page", "about");
+ }}
+ >
+ {children}
+
+
>
);
diff --git a/docs/app/docs/layout.tsx b/docs/app/docs/layout.tsx
index b144332b6b..766d82c991 100644
--- a/docs/app/docs/layout.tsx
+++ b/docs/app/docs/layout.tsx
@@ -1,18 +1,33 @@
-import type { ReactNode } from "react";
-import { Analytics } from "@vercel/analytics/react";
import { baseOptions } from "@/app/layout.config";
import { CustomDocsLayout } from "@/components/CustomDocsLayout";
import { Footer } from "@/components/Footer";
import { source } from "@/lib/source/docs";
+import type { ReactNode } from "react";
+import * as Sentry from "@sentry/nextjs";
export default function Layout({ children }: { children: ReactNode }) {
return (
<>
- {children}
+
+ We encountered an error trying to show this page. Please report
+ this to us on GitHub at{" "}
+
+ https://github.com/TypeCellOS/BlockNote/issues
+
+
+ }
+ beforeCapture={(scope) => {
+ scope.setTag("type", "react-render");
+ scope.setTag("page", "docs");
+ }}
+ >
+ {children}
+
-
>
);
}
diff --git a/docs/app/examples/layout.tsx b/docs/app/examples/layout.tsx
index e82b8a4039..2fc00f9155 100644
--- a/docs/app/examples/layout.tsx
+++ b/docs/app/examples/layout.tsx
@@ -1,11 +1,11 @@
-import type { ReactNode } from "react";
-import { Analytics } from "@vercel/analytics/react";
import { baseOptions } from "@/app/layout.config";
import { CustomDocsLayout } from "@/components/CustomDocsLayout";
import { Footer } from "@/components/Footer";
import { ProBadge } from "@/components/ProBadge";
import { source } from "@/lib/source/examples";
import { getExampleData } from "@/util/getExampleData";
+import type { ReactNode } from "react";
+import * as Sentry from "@sentry/nextjs";
export default function Layout({ children }: { children: ReactNode }) {
// Add Pro badges to example pages in sidebar.
@@ -22,7 +22,7 @@ export default function Layout({ children }: { children: ReactNode }) {
page.name = (
- {exampleData.title}
+ {exampleData.title}
{exampleData.isPro && }
);
@@ -34,10 +34,25 @@ export default function Layout({ children }: { children: ReactNode }) {
return (
<>
- {children}
+
+ We encountered an error trying to show this page. Please report
+ this to us on GitHub at{" "}
+
+ https://github.com/TypeCellOS/BlockNote/issues
+
+
+ }
+ beforeCapture={(scope) => {
+ scope.setTag("type", "react-render");
+ scope.setTag("page", "examples");
+ }}
+ >
+ {children}
+
-
>
);
}
diff --git a/docs/app/global-error.tsx b/docs/app/global-error.tsx
index 9bda5feef0..498b5984d3 100644
--- a/docs/app/global-error.tsx
+++ b/docs/app/global-error.tsx
@@ -4,9 +4,13 @@ import * as Sentry from "@sentry/nextjs";
import NextError from "next/error";
import { useEffect } from "react";
-export default function GlobalError({ error }: { error: Error & { digest?: string } }) {
+export default function GlobalError({
+ error,
+}: {
+ error: Error & { digest?: string };
+}) {
useEffect(() => {
- Sentry.captureException(error);
+ Sentry.captureException(error, { tags: { type: "react-render" } });
}, [error]);
return (
@@ -20,4 +24,4 @@ export default function GlobalError({ error }: { error: Error & { digest?: strin