diff --git a/drama-queen/entrypoint.sh b/drama-queen/entrypoint.sh
index e3101bc9..f8a041cd 100644
--- a/drama-queen/entrypoint.sh
+++ b/drama-queen/entrypoint.sh
@@ -1,4 +1,5 @@
#!/bin/sh
echo "window._env_['VITE_QUEEN_URL'] = '$VITE_QUEEN_URL';" >> /usr/share/nginx/html/env-config.js
echo "window._env_['VITE_QUEEN_V2_URL'] = '$VITE_QUEEN_V2_URL';" >> /usr/share/nginx/html/env-config.js
+echo "window._env_['VITE_CAPMI_URL'] = '$VITE_CAPMI_URL';" >> /usr/share/nginx/html/env-config.js
exec "$@"
\ No newline at end of file
diff --git a/drama-queen/src/custom.d.ts b/drama-queen/src/custom.d.ts
index ec176b77..bd622b76 100644
--- a/drama-queen/src/custom.d.ts
+++ b/drama-queen/src/custom.d.ts
@@ -1,9 +1,11 @@
declare module "queen_v2/*";
declare module "queen";
+declare module "capmi";
declare namespace JSX {
interface IntrinsicElements {
"queen-app": any;
"queen-v2-app": any;
+ "capmi-app": any;
}
}
diff --git a/drama-queen/src/queen-service-worker.js b/drama-queen/src/queen-service-worker.js
index 93321808..65e71c37 100644
--- a/drama-queen/src/queen-service-worker.js
+++ b/drama-queen/src/queen-service-worker.js
@@ -1,9 +1,12 @@
/* eslint-disable no-restricted-globals */
self._QUEEN_URL = import.meta.env.VITE_QUEEN_URL;
self._QUEEN_V2_URL = import.meta.env.VITE_QUEEN_V2_URL;
+self._QUEEN_CAPMI_URL = import.meta.env.VITE_CAPMI_URL;
importScripts(`${self._QUEEN_URL}/queen-service-worker.js`);
importScripts(`${self._QUEEN_V2_URL}/queen-service-worker.js`);
+// The line above raise error in pearl ui (check why with insee)
+// importScripts(`${self._QUEEN_CAPMI_URL}/queen-service-worker.js`);
const getDramaQueenUrlRegex = (url) => {
return url
diff --git a/drama-queen/src/routing/createRoutes.tsx b/drama-queen/src/routing/createRoutes.tsx
index 29e691a5..f290d747 100644
--- a/drama-queen/src/routing/createRoutes.tsx
+++ b/drama-queen/src/routing/createRoutes.tsx
@@ -7,6 +7,10 @@ import type { RouteObject } from "react-router-dom";
export const createRoutes = (queenVersion: 1 | 2 = 1): RouteObject[] => {
const queenElement = queenVersion === 1 ? : ;
return [
+ {
+ path: "/queen/gide/questionnaire/:quest/survey-unit/:surv",
+ element:
+ },
{
path: "queen/env",
element:
diff --git a/drama-queen/src/utils/injectLegacyQueens.ts b/drama-queen/src/utils/injectLegacyQueens.ts
index 4a876f84..69983250 100644
--- a/drama-queen/src/utils/injectLegacyQueens.ts
+++ b/drama-queen/src/utils/injectLegacyQueens.ts
@@ -6,4 +6,5 @@ const injectBodyScript = (url: string) => {
export const injectLegacyEntryQueens = () => {
injectBodyScript(`${import.meta.env.VITE_QUEEN_URL}/entry.js`);
injectBodyScript(`${import.meta.env.VITE_QUEEN_V2_URL}/entry.js`);
+ injectBodyScript(`${import.meta.env.VITE_CAPMI_URL}/entry.js`);
};
diff --git a/drama-queen/src/vite-env.d.ts b/drama-queen/src/vite-env.d.ts
index 0d0d12c4..a6b15496 100644
--- a/drama-queen/src/vite-env.d.ts
+++ b/drama-queen/src/vite-env.d.ts
@@ -5,6 +5,7 @@ declare const APP_VERSION: string;
interface ImportMetaEnv {
readonly VITE_QUEEN_URL: string;
readonly VITE_QUEEN_V2_URL: string;
+ readonly VITE_CAPMI_URL: string;
readonly VITE_CAMPAIGN_ID_V2: string[];
// more env variables...
}