From a227f2103a008316b3644b4a190c159c2bcdd9dc Mon Sep 17 00:00:00 2001 From: al Date: Wed, 7 Aug 2024 18:21:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9ImagesMask=E5=BC=95=E5=85=A5?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/ImagesMask/index.jsx | 1 - components/Photos/index.js | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/ImagesMask/index.jsx b/components/ImagesMask/index.jsx index fe63a28..c098a5e 100644 --- a/components/ImagesMask/index.jsx +++ b/components/ImagesMask/index.jsx @@ -13,7 +13,6 @@ import { faAngleLeft, faAngleRight } from "@fortawesome/free-solid-svg-icons"; import { createRoot } from "react-dom/client"; const maskDomBox = window ? document?.getElementById("maskDomBox") : null; -console.log(maskDomBox); const root = createRoot(maskDomBox); function ImagesMask({}, ref) { const [currentIndex, setCurrentIndex] = useState(0); diff --git a/components/Photos/index.js b/components/Photos/index.js index d5c7eff..1281ba0 100644 --- a/components/Photos/index.js +++ b/components/Photos/index.js @@ -7,8 +7,11 @@ import { faAngleUp, faClose } from "@fortawesome/free-solid-svg-icons"; import { useRouter } from "next/navigation"; import baseRequest from "@/utils/baseRequest"; import Player from "next-video/player"; -import ImagesMask from "@/components/ImagesMask"; - +import dynamic from 'next/dynamic' +// import ImagesMask from "@/components/ImagesMask"; +const ImagesMask = dynamic(() => +import('@/components/ImagesMask'), { ssr: false } +) export default function Photos({ isUnlocked, mediaVisibleRange,