Adopt new layout files for app, epub, html, and pdf routes to standardize Next.js nested layout structure. Refactor SegmentsSidebar to accept an explicit epubBookRef prop, decoupling it from internal context. Enhance EPUB resize hook to ignore initial baseline rect and avoid unnecessary TTS interruptions on load. Simplify Providers by removing legacy context nesting and conditional logic.
17 lines
451 B
TypeScript
17 lines
451 B
TypeScript
'use client';
|
|
|
|
import type { ReactNode } from 'react';
|
|
|
|
import { ConfigProvider } from '@/contexts/ConfigContext';
|
|
import { TTSProvider } from '@/contexts/TTSContext';
|
|
import { PDFProvider } from '@/contexts/PDFContext';
|
|
|
|
export default function PdfReaderLayout({ children }: { children: ReactNode }) {
|
|
return (
|
|
<ConfigProvider>
|
|
<TTSProvider>
|
|
<PDFProvider>{children}</PDFProvider>
|
|
</TTSProvider>
|
|
</ConfigProvider>
|
|
);
|
|
}
|