From 98de4f9145e9048ffffb00b336ef22dc0e6aaaf7 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Mon, 2 Jun 2025 22:47:56 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F(frontend)=20extract=20hardco?= =?UTF-8?q?ded=20domain=20to=20use=20dynamic=20window=20origin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace hardcoded visio.numerique.gouv.fr with automatic detection based on window.location.origin for better environment flexibility. --- src/frontend/src/components/NotFoundScreen.tsx | 3 +-- .../src/features/home/components/JoinMeetingDialog.tsx | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/frontend/src/components/NotFoundScreen.tsx b/src/frontend/src/components/NotFoundScreen.tsx index 6f7d9129..b4922a5c 100644 --- a/src/frontend/src/components/NotFoundScreen.tsx +++ b/src/frontend/src/components/NotFoundScreen.tsx @@ -10,8 +10,7 @@ export const NotFoundScreen = () => { - {t('notFound.body')}{' '} - https://visio.numerique.gouv.fr/xxx-yyyy-zzz. + {t('notFound.body')} {window.origin}/xxx-yyyy-zzz. diff --git a/src/frontend/src/features/home/components/JoinMeetingDialog.tsx b/src/frontend/src/features/home/components/JoinMeetingDialog.tsx index 33bbeee9..53ff0c82 100644 --- a/src/frontend/src/features/home/components/JoinMeetingDialog.tsx +++ b/src/frontend/src/features/home/components/JoinMeetingDialog.tsx @@ -23,7 +23,7 @@ export const JoinMeetingDialog = () => { name="roomId" label={t('joinInputLabel')} description={t('joinInputExample', { - example: 'https://visio.numerique.gouv.fr/azer-tyu-qsdf', + example: window.origin + '/azer-tyu-qsdf', })} validate={(value) => { return !isRoomValid(value.trim()) ? (