Remove support of iframe=true search parameter

pull/2529/head
Jérémy Rialland 2023-02-28 14:10:07 +01:00 committed by Johan Girod
parent 53b28a1858
commit ee2c26812f
4 changed files with 3 additions and 11 deletions

View File

@ -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
}

View File

@ -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())

View File

@ -186,9 +186,7 @@
</div>
<script>
const isIframe = new URLSearchParams(
document.location.search.substring(1)
).get('iframe')
const isIframe = document.location.pathname.startsWith('/iframes/')
function getItem(key) {
try {

View File

@ -74,7 +74,7 @@ function IntegrationCustomizer() {
''
const iframeRef = useRef<HTMLIFrameElement>(null)
const iframeSrc = useHref(`/iframes/${currentIframePath}?iframe=true`)
const iframeSrc = useHref(`/iframes/${currentIframePath}`)
useEffect(() => {
window.addEventListener(