верификация вывод pdf

This commit is contained in:
Nastya 2024-07-10 18:51:18 +03:00
parent 51752ba5e6
commit 19a518d651
3 changed files with 7 additions and 11 deletions

@ -17,7 +17,8 @@ export const verification = async (
try {
const verificationResponse = await makeRequest<never, Verification>({
method: "GET",
url: `${API_URL}/${userId}`,
url: API_URL,
// url: `${API_URL}/${userId}`,
useToken: true,
withCredentials: true,
});

@ -57,10 +57,7 @@ import AfterPay from "./pages/AfterPay";
import { PageNotFound } from "./pages/PageNotFound";
import {setNotEnoughMoneyAmount} from "@stores/cart"
pdfjs.GlobalWorkerOptions.workerSrc = new URL(
"pdfjs-dist/build/pdf.worker.min.js",
import.meta.url
).toString();
pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.js`;
const App = () => {
const location = useLocation();

@ -21,10 +21,7 @@ interface Props {
accept?: string;
}
pdfjs.GlobalWorkerOptions.workerSrc = new URL(
"pdfjs-dist/build/pdf.worker.min.js",
import.meta.url
).toString()
pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.js`;
export default function DocumentUploadItem({
text,
@ -96,7 +93,8 @@ export default function DocumentUploadItem({
multiple
accept={accept}
/>
<Document file={document.file || (documentUrl && { url: documentUrl })}>
{(document.file || documentUrl) &&
<Document file={document.file || documentUrl}>
<Page
pageNumber={1}
width={200}
@ -104,7 +102,7 @@ export default function DocumentUploadItem({
renderAnnotationLayer={false}
onClick={downloadFile}
/>
</Document>
</Document>}
</Box>
)
}