import { useState } from 'react' interface GlobalErrorProps { error: Error | unknown } export default function GlobalError({ error }: GlobalErrorProps) { console.error('Error in root route:', error) const [showFull, setShowFull] = useState(false) return (

Oops! Unexpected error occurred.

Something went wrong. Try to{' '} {' '} or
feel free to{' '} contact us {' '} if the problem persists.

Error: {error instanceof Error ? error.message : String(error)}
              
                {error instanceof Error
                  ? showFull
                    ? error.stack
                    : error.stack?.slice(0, 200)
                  : String(error)}
              
            
) }