Fix refreshing issue
This commit is contained in:
parent
4de0f475e1
commit
9823cd9596
1 changed files with 10 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue