From 54296973a816e7f4abb27110828266d80cbf2e8a Mon Sep 17 00:00:00 2001
From: Dylan Decrulle <81740200+ddecrulle@users.noreply.github.com>
Date: Fri, 10 Nov 2023 14:56:13 +0100
Subject: [PATCH] base usecases
---
drama-queen/src/App.tsx | 33 ---------------------------
drama-queen/src/bootstrap.tsx | 19 +++++++++++----
drama-queen/src/ui/auth.tsx | 2 +-
drama-queen/src/ui/routing/routes.tsx | 7 +++++-
4 files changed, 22 insertions(+), 39 deletions(-)
delete mode 100644 drama-queen/src/App.tsx
diff --git a/drama-queen/src/App.tsx b/drama-queen/src/App.tsx
deleted file mode 100644
index e35bf5cf..00000000
--- a/drama-queen/src/App.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import { createCoreProvider } from "core";
-import { RequiresAuthentication } from "ui/auth";
-import { LoadingData } from "ui/pages/LoadingData";
-
-
-const { CoreProvider } = createCoreProvider({
- "apiUrl": import.meta.env.VITE_API_URL,
- "publicUrl": import.meta.env.BASE_URL,
- "oidcParams": {
- "issuerUri": import.meta.env.VITE_OIDC_ISSUER,
- "clientId": import.meta.env.VITE_OIDC_CLIENT_ID,
- },
-});
-
-export default function App() {
- console.log("public", import.meta.env.BASE_URL)
- return (
- /*
-
-
-
-
-
-
-
-
- */
- Loading} >
-
-
-
- )
-}
\ No newline at end of file
diff --git a/drama-queen/src/bootstrap.tsx b/drama-queen/src/bootstrap.tsx
index 59d1016f..bcfa47e6 100644
--- a/drama-queen/src/bootstrap.tsx
+++ b/drama-queen/src/bootstrap.tsx
@@ -1,8 +1,18 @@
import { createRoot } from "react-dom/client";
import { type RoutingStrategy, createRouter } from "ui/routing/createRouter";
import { injectLegacyEntryQueens } from "core/injectLegacyQueens";
-import App from "App";
-
+import CircularProgress from "@mui/material/CircularProgress"
+import { createCoreProvider } from "core";
+import { RouterProvider } from "react-router-dom";
+
+const { CoreProvider } = createCoreProvider({
+ "apiUrl": import.meta.env.VITE_API_URL,
+ "publicUrl": import.meta.env.BASE_URL,
+ "oidcParams": {
+ "issuerUri": import.meta.env.VITE_OIDC_ISSUER,
+ "clientId": import.meta.env.VITE_OIDC_CLIENT_ID,
+ },
+});
const mount = ({
mountPoint,
@@ -20,8 +30,9 @@ const mount = ({
const router = createRouter({ strategy: routingStrategy, initialPathname });
const root = createRoot(mountPoint);
root.render(
-
- );
+ } >
+
+ );
return () => queueMicrotask(() => root.unmount());
};
diff --git a/drama-queen/src/ui/auth.tsx b/drama-queen/src/ui/auth.tsx
index cdac10a1..5d52206d 100644
--- a/drama-queen/src/ui/auth.tsx
+++ b/drama-queen/src/ui/auth.tsx
@@ -1,5 +1,5 @@
import { ReactNode } from "react";
-import { useCoreFunctions, useCoreState } from "core";
+import { useCoreFunctions } from "core";
export function RequiresAuthentication(props:
diff --git a/drama-queen/src/ui/routing/routes.tsx b/drama-queen/src/ui/routing/routes.tsx
index 242034f8..571fceb5 100644
--- a/drama-queen/src/ui/routing/routes.tsx
+++ b/drama-queen/src/ui/routing/routes.tsx
@@ -5,6 +5,7 @@ import type { RouteObject } from "react-router-dom";
import { SynchronizePage } from "ui/pages/synchronize/SynchronizePage";
import { SurveyMapping } from "ui/pages/queenMapping/SuryveyMapping";
import { RequiresAuthentication } from "ui/auth";
+import { LoadingData } from "ui/pages/LoadingData";
//ReadOnly path is a bad pattern must be change (affects pearl,moog,queen)
export const routes: RouteObject[] = [
@@ -25,7 +26,11 @@ export const routes: RouteObject[] = [
element:
},
{
- path: "/synchronize",
+ path: "/synchronize-old",
element:
+ },
+ {
+ path: "/synchronize",
+ element:
}
]
\ No newline at end of file