From 014c46ec0aae96e4a139dc8dd4f8e83e64f4f165 Mon Sep 17 00:00:00 2001 From: Choco Date: Fri, 18 Aug 2023 10:49:09 +1000 Subject: [PATCH 1/5] Remove service context, init service in management pages --- frontend/src/App.tsx | 31 +++++++++---------- frontend/src/contexts/ServiceContext.tsx | 15 --------- .../ManagementLoginPage.tsx | 11 +++---- .../ManagementMasterCommitteePage.tsx | 10 +++--- .../AddMasterNodeDialog.tsx | 9 +++--- .../promote-dialog/PromoteDialog.tsx | 11 +++---- .../RemoveMasterNodeDialog.tsx | 10 +++--- 7 files changed, 37 insertions(+), 60 deletions(-) delete mode 100644 frontend/src/contexts/ServiceContext.tsx diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index c25da54..88960ab 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -4,7 +4,6 @@ import Alert from '@/components/alert/Alert'; import Loader from '@/components/loader/Loader'; import Nav from '@/components/nav/Nav'; import AlertProvider from '@/contexts/AlertContext'; -import ServiceContextProvider from '@/contexts/ServiceContext'; import ThemeContextProvider from '@/contexts/ThemeContext'; import TimeContextProvider from '@/contexts/TimeContext'; import { useIsDesktop } from '@/hooks/useMediaQuery'; @@ -19,25 +18,23 @@ function App() { - -
-
-
+ }> +