From ee2c26812f8b46cdfde9a569fd2802726ae4c095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rialland?= Date: Tue, 28 Feb 2023 14:10:07 +0100 Subject: [PATCH] Remove support of iframe=true search parameter --- site/source/components/utils/useIsEmbedded.tsx | 7 +------ site/source/entries/entry-iframe.ts | 1 - site/source/entries/template.html | 4 +--- site/source/pages/integration/Iframe.tsx | 2 +- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/site/source/components/utils/useIsEmbedded.tsx b/site/source/components/utils/useIsEmbedded.tsx index 15f2144aa..2754bd0d1 100644 --- a/site/source/components/utils/useIsEmbedded.tsx +++ b/site/source/components/utils/useIsEmbedded.tsx @@ -8,11 +8,6 @@ export function useIsEmbedded(): boolean { } catch (e) { // When useMatch is called outside ReactRouter context, it raise an error. We can safely ignore it. } - if (import.meta.env.SSR) { - return false - } - return !!new URLSearchParams(document.location.search.substring(1)).get( - 'iframe' - ) + return false } diff --git a/site/source/entries/entry-iframe.ts b/site/source/entries/entry-iframe.ts index f3464fa66..4d34cd025 100644 --- a/site/source/entries/entry-iframe.ts +++ b/site/source/entries/entry-iframe.ts @@ -39,7 +39,6 @@ const src = new URL( (moduleName as string) ) -src.searchParams.set('iframe', 'true') src.searchParams.set( 'integratorUrl', encodeURIComponent(window.location.href.toString()) diff --git a/site/source/entries/template.html b/site/source/entries/template.html index a6d5b5d0e..0a331393c 100644 --- a/site/source/entries/template.html +++ b/site/source/entries/template.html @@ -186,9 +186,7 @@