37 lines
739 B
TypeScript
37 lines
739 B
TypeScript
'use client';
|
|
|
|
import React from 'react';
|
|
import { ApiError } from '@/lib/api/base/ApiError';
|
|
import { ErrorDisplay as UiErrorDisplay } from '@/ui/ErrorDisplay';
|
|
|
|
interface ErrorDisplayProps {
|
|
error: ApiError;
|
|
onRetry?: () => void;
|
|
}
|
|
|
|
/**
|
|
* User-friendly error display for production environments
|
|
*/
|
|
export function ErrorDisplay({ error, onRetry }: ErrorDisplayProps) {
|
|
return (
|
|
<UiErrorDisplay
|
|
error={error}
|
|
onRetry={onRetry}
|
|
variant="full-screen"
|
|
/>
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Full-screen error display with more context
|
|
*/
|
|
export function FullScreenError({ error, onRetry }: ErrorDisplayProps) {
|
|
return (
|
|
<UiErrorDisplay
|
|
error={error}
|
|
onRetry={onRetry}
|
|
variant="full-screen"
|
|
/>
|
|
);
|
|
}
|