Files
slot/ui/src/App.tsx
2025-06-03 00:14:21 +02:00

26 lines
673 B
TypeScript

import { Button } from "@/components/ui/button"
import { ComposedChart } from "@/components/ui/composedchart.tsx";
import { ErrorBoundary, FallbackProps } from "react-error-boundary";
function Fallback(fallbackProps: FallbackProps) {
return (
<div role="alert">
<p>Something went wrong:</p>
<pre style={{ color: "red" }}>{fallbackProps.error.message}</pre>
</div>
);
}
function App() {
return (
<>
<ErrorBoundary fallbackRender={Fallback}>
<ComposedChart></ComposedChart>
<Button>Click me</Button>
</ErrorBoundary>
</>
)
}
export default App