From 0f3f0c5c74826f556b82a8ca16e50535419980e2 Mon Sep 17 00:00:00 2001 From: Tadayoshi Sato Date: Thu, 9 Nov 2023 17:07:33 +0900 Subject: [PATCH] refactor(ui): polish HawtioPage --- packages/hawtio/src/ui/page/HawtioPage.tsx | 40 +++++++--------------- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/packages/hawtio/src/ui/page/HawtioPage.tsx b/packages/hawtio/src/ui/page/HawtioPage.tsx index 1e8035a4..fa852a95 100644 --- a/packages/hawtio/src/ui/page/HawtioPage.tsx +++ b/packages/hawtio/src/ui/page/HawtioPage.tsx @@ -5,16 +5,7 @@ import { backgroundImages } from '@hawtiosrc/img' import { PluginNodeSelectionContext, usePluginNodeSelected } from '@hawtiosrc/plugins' import { HawtioPreferences } from '@hawtiosrc/preferences/HawtioPreferences' import { preferencesService } from '@hawtiosrc/preferences/preferences-service' -import { - BackgroundImage, - EmptyState, - EmptyStateIcon, - EmptyStateVariant, - Page, - PageSection, - PageSectionVariants, - Title, -} from '@patternfly/react-core' +import { BackgroundImage, EmptyState, EmptyStateIcon, Page, PageSection, Title } from '@patternfly/react-core' import { CubesIcon } from '@patternfly/react-icons' import React from 'react' import { Navigate, Route, Routes, useLocation, useNavigate } from 'react-router-dom' @@ -43,24 +34,8 @@ export const HawtioPage: React.FunctionComponent = () => { navigate('login') } - const HawtioHome = () => ( - - - - - Hawtio - - - - ) - const defaultPlugin = plugins[0] ?? null - let defaultPage - if (defaultPlugin) { - defaultPage = - } else { - defaultPage = - } + const defaultPage = defaultPlugin ? : const showVerticalNavByDefault = preferencesService.isShowVerticalNavByDefault() @@ -92,3 +67,14 @@ export const HawtioPage: React.FunctionComponent = () => { ) } + +const HawtioHome: React.FunctionComponent = () => ( + + + + + Hawtio + + + +)