Skip to content

AbortError: signal is aborted without reason #160

@SaravananArumugam24

Description

@SaravananArumugam24

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions