fix: Embed breaks back button behavior (#11775)

pull/11817/head^2
Rahul Roy 2023-10-12 04:20:11 +05:30 committed by GitHub
parent dc9a4f0dba
commit 41dd7bbdde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -118,6 +118,7 @@ export const tabs = [
{ calLink: string; embedType: EmbedType; previewState: PreviewState }
>(function Preview({ calLink, embedType }, ref) {
const bookerUrl = useBookerUrl();
const iframeSrc = `${EMBED_PREVIEW_HTML_URL}?embedType=${embedType}&calLink=${calLink}&embedLibUrl=${embedLibUrl}&bookerUrl=${bookerUrl}`
if (ref instanceof Function || !ref) {
return null;
}
@ -131,7 +132,8 @@ export const tabs = [
className="h-[100vh] border"
width="100%"
height="100%"
src={`${EMBED_PREVIEW_HTML_URL}?embedType=${embedType}&calLink=${calLink}&embedLibUrl=${embedLibUrl}&bookerUrl=${bookerUrl}`}
src={iframeSrc}
key={iframeSrc}
/>
);
}),