diff --git a/layouts/PrintSlide.jsx b/layouts/PrintSlide.jsx index 27b57574..8ebedcd1 100644 --- a/layouts/PrintSlide.jsx +++ b/layouts/PrintSlide.jsx @@ -47,7 +47,7 @@ export default dynamic(() => Promise.resolve(PrintSlide), { }); function PrintSlide({ children, next }) { - console.log('PrintSlide:children : ', children) + // console.log('PrintSlide:children : ', children) let generatedSlides = []; let generatorCount = 0; // Filter down children by only Slides diff --git a/pages/files/[format]/[file].js b/pages/files/[format]/[file].js index 00591577..68ed15f2 100644 --- a/pages/files/[format]/[file].js +++ b/pages/files/[format]/[file].js @@ -15,6 +15,7 @@ import fs from 'fs' import path from 'path' import Head from 'next/head'; import Script from 'next/script'; +import dynamic from 'next/dynamic' const glob = require('glob') @@ -126,7 +127,11 @@ export async function getStaticProps(context) { } } -export default function Pad({ source, format }) { +export default dynamic(() => Promise.resolve(Pad), { + ssr: false, +}); + +function Pad({ source, format }) { const mdxContainer = useRef(null); const previewContainer = useRef(null); let contentMdx = ``; @@ -136,7 +141,7 @@ export default function Pad({ source, format }) { contentMdx = `${mdxContainer.current?.innerHTML}`; paged .preview(contentMdx, - [], + ['/pdf.css'], previewContainer.current ) .then((flow) => { @@ -159,7 +164,7 @@ export default function Pad({ source, format }) { return ( <>
- + {/* */}