Fix refreshing issue

This commit is contained in:
Richard Roberson 2025-01-19 20:27:39 -07:00
parent 4de0f475e1
commit 9823cd9596

View file

@ -1,6 +1,6 @@
'use client';
import { PDFViewer } from '@/components/PDFViewer';
import dynamic from 'next/dynamic';
import { usePDF } from '@/contexts/PDFContext';
import { useParams, useRouter } from 'next/navigation';
import Link from 'next/link';
@ -9,6 +9,15 @@ import { PDFSkeleton } from '@/components/PDFSkeleton';
import TTSPlayer from '@/components/TTSPlayer';
import { useTTS } from '@/contexts/TTSContext';
// Dynamic import for client-side rendering only
const PDFViewer = dynamic(
() => import('@/components/PDFViewer').then((module) => module.PDFViewer),
{
ssr: false,
loading: () => <PDFSkeleton />
}
);
export default function PDFViewerPage() {
const { id } = useParams();
const { getDocument } = usePDF();