We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi Team,
I am getting abortError & I have pasted by code below. Please let know if you have any solution
My Code: import dynamic from 'next/dynamic'; import { DocumentViewerProps } from "@/Interface/DocumentViewer" import { useEffect, useState } from 'react'; const DocViewer = dynamic(() => import('react-doc-viewer'), { ssr: false });
const DocumentViewer: React.FC = ({ URL, }) => { const [documents, setDocuments] = useState([]);
useEffect(() => { if (URL) { const docs = [{ uri: URL }]; setDocuments(docs); } }, [URL]); return ( <div> {documents.length > 0 ? ( <DocViewer documents={documents} /> ) : ( <p>Loading documents...</p> )} </div> );
}
export default DocumentViewer
The text was updated successfully, but these errors were encountered:
Mention the fieType: '', in your IDocument object,it will work. Example
const data: DOC_TYPE[] = [ { id: 1, title: 'Network pdf', path: [{ uri: ('https://pdfobject.com/pdf/sample.pdf'), fileType: 'pdf' }], local: false }, { id: 2, title: 'Network pdf', path: [{ uri: ('../src/assets/sample.pdf'), fileType: 'pdf' }], local: false }, ];
Sorry, something went wrong.
@Horadrim check https://github.com/vercel/next.js/discussions/62122#discussioncomment-9458763 about node version
No branches or pull requests
Hi Team,
I am getting abortError & I have pasted by code below. Please let know if you have any solution
My Code:
import dynamic from 'next/dynamic';
import { DocumentViewerProps } from "@/Interface/DocumentViewer"
import { useEffect, useState } from 'react';
const DocViewer = dynamic(() => import('react-doc-viewer'), { ssr: false });
const DocumentViewer: React.FC = ({
URL,
}) => {
const [documents, setDocuments] = useState([]);
}
export default DocumentViewer
The text was updated successfully, but these errors were encountered: