main
tsx 15 lines 332 Bytes
Raw
1 import { Panel } from './panel.tsx'
2 import type { JSX } from 'react'
3 import './error.css'
4
5 interface ErrorPanelProps {
6 error: Error
7 }
8
9 export function ErrorPanel ({ error }: ErrorPanelProps): JSX.Element {
10 return (
11 <Panel className='Error'>
12 <pre><code>{error.stack ?? error.toString()}</code></pre>
13 </Panel>
14 )
15 }