Skip to content

Commit 83d5b67

Browse files
committed
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! feat: Syllabus page for learner MFE
1 parent f796a1d commit 83d5b67

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/PrintSyllabus.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,10 @@ export const PrintSyllabus = ({ blockData }: { blockData: BlockResponse }) => {
8484
const printSyllabus = () => {
8585
const blocks = blockData?.blocks;
8686
const rootBlock = blockData?.blocks[blockData.root];
87-
setSrcdoc(buildSyllabusForPrint(intl, blocks, rootBlock));
88-
iframeRef.current.contentWindow.print();
87+
const srcdoc = buildSyllabusForPrint(intl, blocks, rootBlock);
88+
var iframe = document.createElement('iframe');
89+
iframe.setAttribute("style", "display:none");
90+
iframe.contentWindow.print();
8991
};
9092

9193
return (

0 commit comments

Comments
 (0)