From ad5c706e160be6ddcaa9d45ca1d37a32a217a3bd Mon Sep 17 00:00:00 2001 From: pollutri Date: Mon, 18 May 2026 17:46:52 +0200 Subject: [PATCH] Book card interaction smooth 3 --- components/PublicGrid.tsx | 4 ++-- types/page-flip.d.ts | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/components/PublicGrid.tsx b/components/PublicGrid.tsx index 6c2d7ad..04c10ef 100644 --- a/components/PublicGrid.tsx +++ b/components/PublicGrid.tsx @@ -446,7 +446,7 @@ function playFlipSound(ctx: AudioContext | null) { function FlipBook({ pages, onClose }: { pages: string[]; onClose: () => void }) { const containerRef = useRef(null); - const flipRef = useRef(null); + const flipRef = useRef(null); const audioRef = useRef(null); const [currentPage, setCurrentPage] = useState(0); const [pageCount, setPageCount] = useState(pages.length); @@ -471,7 +471,7 @@ function FlipBook({ pages, onClose }: { pages: string[]; onClose: () => void }) block.style.height = '100%'; containerRef.current.appendChild(block); - import('page-flip').then(({ PageFlip }) => { + import('page-flip/dist/js/page-flip.module.js').then(({ PageFlip }) => { if (cancelled) return; const flip = new PageFlip(block, { width: 550, diff --git a/types/page-flip.d.ts b/types/page-flip.d.ts index 7547ebf..ff27b51 100644 --- a/types/page-flip.d.ts +++ b/types/page-flip.d.ts @@ -42,3 +42,7 @@ declare module 'page-flip' { off(event: string, cb: (e: FlipEvent) => void): void; } } + +declare module 'page-flip/dist/js/page-flip.module.js' { + export * from 'page-flip'; +}