Skip to content

Commit 45dbd00

Browse files
committed
fix: update iframe source and sandbox attributes in SidePanelDocumentation
1 parent 815f0d5 commit 45dbd00

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/components/common/SidePanel/SidePanelDocumentation.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ export const SidePanelDocumentation = ({ onClose }: SidePanelDocumentationProps)
1818
sidePanelConfig: { docLink },
1919
} = useMainContext()
2020

21+
// CONSTANTS
22+
const iframeSrc = `${docLink}&theme=${appTheme}`
23+
2124
return (
2225
<>
2326
<div className="px-16 pt-14 pb-13 border__primary--bottom flex dc__gap-12">
@@ -51,14 +54,15 @@ export const SidePanelDocumentation = ({ onClose }: SidePanelDocumentationProps)
5154
<div className="flex-grow-1">
5255
{docLink && (
5356
<iframe
54-
key={appTheme}
57+
key={iframeSrc}
5558
title="side-panel-documentation"
5659
loading="lazy"
5760
className="dc__no-border"
58-
src={`${docLink}&theme=${appTheme}`}
61+
src={iframeSrc}
5962
width="100%"
6063
height="100%"
61-
sandbox="allow-same-origin allow-scripts clipboard-read"
64+
allow="clipboard-read; clipboard-write"
65+
sandbox="allow-same-origin allow-scripts"
6266
referrerPolicy="no-referrer"
6367
/>
6468
)}

0 commit comments

Comments
 (0)