From 41dd7bbddeab711f483ed566c4cfbd3951c65d0d Mon Sep 17 00:00:00 2001 From: Rahul Roy <41847534+rad10wave@users.noreply.github.com> Date: Thu, 12 Oct 2023 04:20:11 +0530 Subject: [PATCH] fix: Embed breaks back button behavior (#11775) --- packages/features/embed/lib/EmbedTabs.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/features/embed/lib/EmbedTabs.tsx b/packages/features/embed/lib/EmbedTabs.tsx index 0671d0c599..0f81c2c660 100644 --- a/packages/features/embed/lib/EmbedTabs.tsx +++ b/packages/features/embed/lib/EmbedTabs.tsx @@ -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} /> ); }),