Commit b44bfbe 1 parent 08eb005 commit b44bfbe Copy full SHA for b44bfbe
File tree 2 files changed +9
-27
lines changed
2 files changed +9
-27
lines changed Original file line number Diff line number Diff line change @@ -17,31 +17,11 @@ export const PageRouter = () => {
17
17
const { activePage } = useDevice ( ) ;
18
18
return (
19
19
< ErrorBoundary FallbackComponent = { ErrorPage } >
20
- { activePage === "messages" && (
21
- < ErrorBoundary FallbackComponent = { ErrorPage } >
22
- < MessagesPage />
23
- </ ErrorBoundary >
24
- ) }
25
- { activePage === "map" && (
26
- < ErrorBoundary FallbackComponent = { ErrorPage } >
27
- < MapPage />
28
- </ ErrorBoundary >
29
- ) }
30
- { activePage === "config" && (
31
- < ErrorBoundary FallbackComponent = { ErrorPage } >
32
- < ConfigPage />
33
- </ ErrorBoundary >
34
- ) }
35
- { activePage === "channels" && (
36
- < ErrorBoundary FallbackComponent = { ErrorPage } >
37
- < ChannelsPage />
38
- </ ErrorBoundary >
39
- ) }
40
- { activePage === "nodes" && (
41
- < ErrorBoundary FallbackComponent = { ErrorPage } >
42
- < NodesPage />
43
- </ ErrorBoundary >
44
- ) }
20
+ { activePage === "messages" && < MessagesPage /> }
21
+ { activePage === "map" && < MapPage /> }
22
+ { activePage === "config" && < ConfigPage /> }
23
+ { activePage === "channels" && < ChannelsPage /> }
24
+ { activePage === "nodes" && < NodesPage /> }
45
25
</ ErrorBoundary >
46
26
) ;
47
27
} ;
Original file line number Diff line number Diff line change 1
1
import { cn } from "@app/core/utils/cn.ts" ;
2
2
import { AlignLeftIcon , type LucideIcon } from "lucide-react" ;
3
+ import { ErrorBoundary } from "react-error-boundary" ;
4
+ import { ErrorPage } from "./UI/ErrorPage" ;
3
5
import Footer from "./UI/Footer" ;
4
6
import { Spinner } from "./UI/Spinner" ;
5
7
@@ -23,7 +25,7 @@ export const PageLayout = ({
23
25
children,
24
26
} : PageLayoutProps ) => {
25
27
return (
26
- < >
28
+ < ErrorBoundary FallbackComponent = { ErrorPage } >
27
29
< div className = "relative flex h-full w-full flex-col" >
28
30
< div className = "flex h-14 shrink-0 border-b-[0.5px] border-slate-300 dark:border-slate-700 md:h-16 md:px-4" >
29
31
< button
@@ -68,6 +70,6 @@ export const PageLayout = ({
68
70
< Footer />
69
71
</ div >
70
72
</ div >
71
- </ >
73
+ </ ErrorBoundary >
72
74
) ;
73
75
} ;
You can’t perform that action at this time.
0 commit comments