|
|
|
@ -17,31 +17,11 @@ export const PageRouter = () => { |
|
|
|
const { activePage } = useDevice(); |
|
|
|
return ( |
|
|
|
<ErrorBoundary FallbackComponent={ErrorPage}> |
|
|
|
{activePage === "messages" && ( |
|
|
|
<ErrorBoundary FallbackComponent={ErrorPage}> |
|
|
|
<MessagesPage /> |
|
|
|
</ErrorBoundary> |
|
|
|
)} |
|
|
|
{activePage === "map" && ( |
|
|
|
<ErrorBoundary FallbackComponent={ErrorPage}> |
|
|
|
<MapPage /> |
|
|
|
</ErrorBoundary> |
|
|
|
)} |
|
|
|
{activePage === "config" && ( |
|
|
|
<ErrorBoundary FallbackComponent={ErrorPage}> |
|
|
|
<ConfigPage /> |
|
|
|
</ErrorBoundary> |
|
|
|
)} |
|
|
|
{activePage === "channels" && ( |
|
|
|
<ErrorBoundary FallbackComponent={ErrorPage}> |
|
|
|
<ChannelsPage /> |
|
|
|
</ErrorBoundary> |
|
|
|
)} |
|
|
|
{activePage === "nodes" && ( |
|
|
|
<ErrorBoundary FallbackComponent={ErrorPage}> |
|
|
|
<NodesPage /> |
|
|
|
</ErrorBoundary> |
|
|
|
)} |
|
|
|
{activePage === "messages" && <MessagesPage />} |
|
|
|
{activePage === "map" && <MapPage />} |
|
|
|
{activePage === "config" && <ConfigPage />} |
|
|
|
{activePage === "channels" && <ChannelsPage />} |
|
|
|
{activePage === "nodes" && <NodesPage />} |
|
|
|
</ErrorBoundary> |
|
|
|
); |
|
|
|
}; |
|
|
|
|