Files
slot/ui/src/App.tsx

26 lines
673 B
TypeScript
Raw Normal View History

2025-06-03 00:14:21 +02:00
import { Button } from "@/components/ui/button"
import { ComposedChart } from "@/components/ui/composedchart.tsx";
2025-05-05 23:28:09 +02:00
2025-06-03 00:14:21 +02:00
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>
);
}
2025-05-05 23:28:09 +02:00
2025-06-03 00:14:21 +02:00
function App() {
return (
<>
<ErrorBoundary fallbackRender={Fallback}>
<ComposedChart></ComposedChart>
<Button>Click me</Button>
</ErrorBoundary>
</>
)
2025-05-05 23:28:09 +02:00
}
2025-06-03 00:14:21 +02:00
export default App