Remove support of iframe=true search parameter
parent
53b28a1858
commit
ee2c26812f
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue