mostly formatting, dependency fix

This commit is contained in:
2026-05-17 02:39:32 +02:00
parent a5dc70aabf
commit cf9a0dd0b7
32 changed files with 837 additions and 836 deletions

View File

@@ -1,5 +1,5 @@
import { useCallback, useEffect, useRef, useState } from "react";
import type { SplitResult } from "../pdf/pdfTypes";
import { useCallback, useEffect, useRef, useState } from 'react';
import type { SplitResult } from '../pdf/pdfTypes';
export interface PdfDownload {
id: string;
@@ -32,10 +32,10 @@ function createDownload(id: string, filename: string, blob: Blob): PdfDownload {
export function usePdfGeneratedOutputs() {
const [splitDownloads, setSplitDownloads] = useState<SplitPdfDownload[]>([]);
const [subsetDownload, setSubsetDownload] = useState<PdfDownload | null>(
null,
null
);
const [exportDownload, setExportDownload] = useState<PdfDownload | null>(
null,
null
);
const splitDownloadsRef = useRef<SplitPdfDownload[]>([]);
@@ -47,7 +47,7 @@ export function usePdfGeneratedOutputs() {
...createDownload(
`split-${result.pageIndex}-${result.filename}`,
result.filename,
result.blob,
result.blob
),
pageIndex: result.pageIndex,
}));
@@ -64,7 +64,7 @@ export function usePdfGeneratedOutputs() {
}, []);
const replaceSubsetResult = useCallback((blob: Blob, filename: string) => {
const nextDownload = createDownload("subset", filename, blob);
const nextDownload = createDownload('subset', filename, blob);
revokeDownload(subsetDownloadRef.current);
subsetDownloadRef.current = nextDownload;
@@ -78,7 +78,7 @@ export function usePdfGeneratedOutputs() {
}, []);
const replaceExportResult = useCallback((blob: Blob, filename: string) => {
const nextDownload = createDownload("export", filename, blob);
const nextDownload = createDownload('export', filename, blob);
revokeDownload(exportDownloadRef.current);
exportDownloadRef.current = nextDownload;