MCPcopy
hub / github.com/21st-dev/1code / render

Method render

src/renderer/components/ui/error-boundary.tsx:42–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40 }
41
42 render() {
43 if (this.state.hasError) {
44 return (
45 <div className="flex flex-col items-center justify-center h-full gap-3 p-4 text-center">
46 <AlertCircle className="h-10 w-10 text-muted-foreground" />
47 <p className="font-medium text-foreground">
48 Failed to render {this.props.viewerType || "file"}
49 </p>
50 <p className="text-sm text-muted-foreground max-w-[300px]">
51 {this.state.error?.message || "An unexpected error occurred."}
52 </p>
53 <Button variant="outline" size="sm" onClick={this.handleReset}>
54 Try again
55 </Button>
56 </div>
57 )
58 }
59
60 return this.props.children
61 }
62}

Callers 2

main.tsxFile · 0.45
mermaid-block.tsxFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected