File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ function App() {
6767 < >
6868 < Analytics />
6969 < Header />
70- < ErrorBoundary fallback = { < ErrorAlert /> } >
70+ < ErrorBoundary FallbackComponent = { ErrorAlert } >
7171 < Suspense fallback = { < Spinner size = "lg" overlay /> } >
7272 < Outlet />
7373 </ Suspense >
@@ -99,7 +99,7 @@ function App() {
9999 }
100100
101101 return (
102- < ErrorBoundary fallback = { < ErrorAlert /> } >
102+ < ErrorBoundary FallbackComponent = { ErrorAlert } >
103103 < DialogContext . Provider value = { dialogContextValue } >
104104 < Toaster />
105105 < RouterProvider router = { router } />
Original file line number Diff line number Diff line change 11import { useTranslation } from 'react-i18next'
22import { Alert , AlertDescription , AlertTitle } from './ui/alert'
33
4- export default function ErrorAlert ( ) {
4+ interface Props {
5+ error ?: Error
6+ }
7+
8+ export default function ErrorAlert ( { error } : Props ) {
59 const { t } = useTranslation ( 'common' )
610 return (
7- < Alert className = "mx-auto mt-12 max-w-lg " >
11+ < Alert className = "mt-12 mx-auto max-w-xl " >
812 < AlertTitle className = "text-lg" > { t ( 'error' ) } </ AlertTitle >
913 < AlertDescription >
1014 < p > Refresh the page to try again.</ p >
@@ -15,6 +19,12 @@ export default function ErrorAlert() {
1519 </ a >
1620 .
1721 </ p >
22+ { error !== undefined && (
23+ < p >
24+ Please include the following error message:
25+ < span className = "block font-mono border-1 border-neutral-700 p-1 rounded mt-1" > { error . message } </ span >
26+ </ p >
27+ ) }
1828 </ AlertDescription >
1929 </ Alert >
2030 )
You can’t perform that action at this time.
0 commit comments