mirror of
https://github.com/aljazceru/claude-code-viewer.git
synced 2026-01-18 04:54:20 +01:00
20 lines
418 B
TypeScript
20 lines
418 B
TypeScript
"use client";
|
|
|
|
import type { FC, PropsWithChildren } from "react";
|
|
import { ErrorBoundary } from "react-error-boundary";
|
|
|
|
export const RootErrorBoundary: FC<PropsWithChildren> = ({ children }) => {
|
|
return (
|
|
<ErrorBoundary
|
|
FallbackComponent={({ error }) => (
|
|
<div>
|
|
<h1>Error</h1>
|
|
<p>{error.message}</p>
|
|
</div>
|
|
)}
|
|
>
|
|
{children}
|
|
</ErrorBoundary>
|
|
);
|
|
};
|