File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
exercises/99.final/01.solution.final/src Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import { SignupRoute } from './routes/signup.tsx'
18
18
19
19
export const router = createBrowserRouter (
20
20
createRoutesFromElements (
21
- < Route >
21
+ < Route errorElement = { < UnknownErrorBoundary /> } >
22
22
< Route element = { < AppLayout /> } >
23
23
< Route element = { < MarketingLayout /> } >
24
24
< Route index element = { < HomepageRoute /> } />
@@ -37,3 +37,14 @@ export const router = createBrowserRouter(
37
37
</ Route > ,
38
38
) ,
39
39
)
40
+
41
+ function UnknownErrorBoundary ( ) {
42
+ return (
43
+ < div className = "bg-danger-background text-danger-foreground mt-20 flex h-full flex-col items-center justify-center px-8 py-12" >
44
+ < h1 className = "text-2xl font-bold" > Unknown error</ h1 >
45
+ < p className = "text-danger-foreground/80 text-sm" >
46
+ An unknown error occurred. Please try again later.
47
+ </ p >
48
+ </ div >
49
+ )
50
+ }
You can’t perform that action at this time.
0 commit comments