({ error, onBackToDashboard, onRetry }: ReportErrorProps)
| 15 | } |
| 16 | |
| 17 | const ReportError = ({ error, onBackToDashboard, onRetry }: ReportErrorProps) => { |
| 18 | return ( |
| 19 | <div className="flex justify-center items-center min-h-screen bg-gradient-to-b from-background to-background/80"> |
| 20 | <Card className="w-[380px] border-destructive/20 shadow-lg"> |
| 21 | <CardHeader className="text-center pb-2"> |
| 22 | <div className="mx-auto bg-destructive/10 p-3 rounded-full mb-3"> |
| 23 | <AlertCircle className="h-6 w-6 text-destructive" /> |
| 24 | </div> |
| 25 | <CardTitle>报告生成失败</CardTitle> |
| 26 | </CardHeader> |
| 27 | <CardContent className="text-center pb-4"> |
| 28 | <p className="text-muted-foreground">{error}</p> |
| 29 | </CardContent> |
| 30 | <CardFooter className="flex justify-center gap-3"> |
| 31 | <Button onClick={onBackToDashboard}>返回仪表盘</Button> |
| 32 | <Button onClick={onRetry} variant="outline"> |
| 33 | 重试 |
| 34 | </Button> |
| 35 | </CardFooter> |
| 36 | </Card> |
| 37 | </div> |
| 38 | ); |
| 39 | }; |
| 40 | |
| 41 | export default ReportError; |
nothing calls this directly
no outgoing calls
no test coverage detected