UNPKG

@ai-growth/nextjs

Version:

Seamlessly integrate Sanity CMS with Next.js applications for automated blog routing and rendering

80 lines 2.57 kB
import React from 'react'; import { type ErrorDetails } from './ErrorBoundary'; export interface ErrorPageProps { /** Custom title for the error page */ title?: string; /** Custom description/message */ message?: string; /** Custom CSS class */ className?: string; /** Custom inline styles */ style?: React.CSSProperties; /** Custom navigation links */ navigationLinks?: NavigationLink[]; /** Whether to show retry button */ showRetry?: boolean; /** Whether to show contact support option */ showSupport?: boolean; /** Custom retry handler */ onRetry?: () => void | Promise<void>; /** Custom support contact handler */ onSupport?: () => void; /** Brand logo or name */ brandName?: string; /** Brand logo URL */ brandLogo?: string; /** Additional custom actions */ customActions?: React.ReactNode; } export interface NavigationLink { label: string; href: string; primary?: boolean; } export interface NotFoundPageProps extends Omit<ErrorPageProps, 'title' | 'message'> { /** Current path that wasn't found */ path?: string; /** Suggested pages for user */ suggestions?: NavigationLink[]; /** Whether to show search functionality */ showSearch?: boolean; /** Search handler */ onSearch?: (query: string) => void; } export interface ServerErrorPageProps extends Omit<ErrorPageProps, 'title' | 'message'> { /** Error code (500, 503, etc.) */ errorCode?: number; /** Error details for debugging */ errorDetails?: ErrorDetails; /** Whether to show technical details */ showTechnicalDetails?: boolean; /** Incident ID for support */ incidentId?: string; } /** * Comprehensive 404 Not Found page with search and navigation options */ export declare const NotFoundPage: React.FC<NotFoundPageProps>; /** * Generic server error page for 500 errors and other server issues */ export declare const ServerErrorPage: React.FC<ServerErrorPageProps>; /** * Generic error page that can be customized for any error scenario */ export declare const ErrorPage: React.FC<ErrorPageProps>; /** * Error boundary wrapper that uses our error pages */ export declare const ErrorPageBoundary: React.FC<{ children: React.ReactNode; fallbackComponent?: React.ComponentType<{ error: Error; errorDetails: ErrorDetails; }>; brandName?: string; brandLogo?: string; onError?: (errorDetails: ErrorDetails) => void; }>; export default ErrorPage; //# sourceMappingURL=ErrorPages.d.ts.map