perf(webui): defer non-chat startup interfaces
This commit is contained in:
1 parent
ae7fed88e2
commit
4bd1b74c6b
20 files changed
+710
-70
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import { Component, type ReactNode } from "react";
|
||||
|
||||
export class SurfaceErrorBoundary extends Component<
|
||||
{ children: ReactNode; fallback: ReactNode },
|
||||
{ failed: boolean }
|
||||
> {
|
||||
state = { failed: false };
|
||||
|
||||
static getDerivedStateFromError() {
|
||||
return { failed: true };
|
||||
}
|
||||
|
||||
render() {
|
||||
return this.state.failed ? this.props.fallback : this.props.children;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user