File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ const PDFViewer = dynamic(
1919
2020export default function PDFViewerPage ( ) {
2121 const { id } = useParams ( ) ;
22- const { setCurrentDocument, currDocName } = usePDF ( ) ;
22+ const { setCurrentDocument, currDocName, clearCurrDoc } = usePDF ( ) ;
2323 const { setText, stop } = useTTS ( ) ;
2424 const [ error , setError ] = useState < string | null > ( null ) ;
2525 const [ isLoading , setIsLoading ] = useState ( true ) ;
@@ -55,9 +55,7 @@ export default function PDFViewerPage() {
5555 < p className = "text-red-500 mb-4" > { error } </ p >
5656 < Link
5757 href = "/"
58- onClick = { ( ) => {
59-
60- } }
58+ onClick = { ( ) => { clearCurrDoc ( ) ; stop ( ) ; } }
6159 className = "inline-flex items-center px-3 py-1 bg-base text-foreground rounded-lg hover:bg-offbase transition-colors"
6260 >
6361 < svg className = "w-4 h-4 mr-2 text-muted" fill = "none" stroke = "currentColor" viewBox = "0 0 24 24" >
You can’t perform that action at this time.
0 commit comments