更改ImagesMask引入方式

This commit is contained in:
al 2024-08-07 18:21:56 +08:00
parent f442b82354
commit a227f2103a
2 changed files with 5 additions and 3 deletions

View File

@ -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);

View File

@ -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,