diff --git a/docs/app/components/icons/broken-bone-icon.tsx b/docs/app/components/icons/broken-bone-icon.tsx new file mode 100644 index 0000000..0f62d48 --- /dev/null +++ b/docs/app/components/icons/broken-bone-icon.tsx @@ -0,0 +1,23 @@ +import type { SVGProps } from 'react' + +export default function BrokenBoneIcon(props: SVGProps) { + return ( + + + + ) +} diff --git a/docs/app/global-error.tsx b/docs/app/global-error.tsx new file mode 100644 index 0000000..f156c43 --- /dev/null +++ b/docs/app/global-error.tsx @@ -0,0 +1,66 @@ +'use client' + +import { vstack } from '@cerberus-design/styled-system/patterns' +import { css } from '@cerberus-design/styled-system/css' +import { Button } from '@cerberus-design/react' +import BrokenBoneIcon from './components/icons/broken-bone-icon' + +// Error boundaries must be Client Components + +export default function GlobalError({ + reset, +}: { + error: Error & { digest?: string } + reset: () => void +}) { + // global-error must include html and body tags + return ( + + +
+ + + + +

+ Cerb your enthusiasm! +

+

+ Something went wrong. Cerberus has sounded the alarm and our demons + are ready for action. +

+ + +
+ + + ) +} diff --git a/docs/app/not-found.tsx b/docs/app/not-found.tsx index 289a4b1..9b08609 100644 --- a/docs/app/not-found.tsx +++ b/docs/app/not-found.tsx @@ -17,8 +17,8 @@ export default function NotFound() { - Return from when you came + Return from whence you came )