File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ import {
88} from "react" ;
99import { ErrorBoundary , type FallbackProps } from "react-error-boundary" ;
1010
11- import { Button } from "@/components/ui/button" ;
1211import { Spinner } from "@/components/ui/spinner" ;
1312
14- import { InfoBox } from "./InfoBox" ;
13+ import TooltipButton from "./Buttons/TooltipButton" ;
14+ import { Icon } from "../ui/icon" ;
1515
1616type ErrorFallbackProps < T extends ComponentType < any > > = FallbackProps & {
1717 originalProps ?: Partial < ComponentProps < T > > ;
@@ -26,11 +26,14 @@ const ErrorFallback = <T extends ComponentType<any>>({
2626 resetErrorBoundary,
2727} : ErrorFallbackProps < T > ) => {
2828 return (
29- < InfoBox title = "There was an error!" variant = "error" >
30- < Button onClick = { ( ) => resetErrorBoundary ( ) } variant = { "ghost" } size = "xs" >
31- Try again
32- </ Button >
33- </ InfoBox >
29+ < TooltipButton
30+ tooltip = "A UI element failed to render. Click to retry."
31+ onClick = { ( ) => resetErrorBoundary ( ) }
32+ variant = "ghost"
33+ size = "min"
34+ >
35+ < Icon name = "FileExclamationPoint" className = "text-destructive" />
36+ </ TooltipButton >
3437 ) ;
3538} ;
3639
You can’t perform that action at this time.
0 commit comments