File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,10 @@ interface ProcessingStepsProps {
1111 onDetect : ( ) => void ;
1212}
1313
14- const EXAMPLE_PDF_URL =
15- "https://us-beautiful-space.nyc3.digitaloceanspaces.com/commonforms/cerfa_14571-05_LONG_SEJOUR_EN.pdf" ;
16- const EXAMPLE_PDF_FILENAME = "cerfa_14571-05_LONG_SEJOUR_EN.pdf" ;
14+ const EXAMPLE_PDF = {
15+ URL : "https://us-beautiful-space.nyc3.digitaloceanspaces.com/commonforms/cerfa_14571-05_LONG_SEJOUR_EN.pdf" ,
16+ FILENAME : "cerfa_14571-05_LONG_SEJOUR_EN.pdf" ,
17+ } ;
1718
1819export const ProcessingSteps = ( {
1920 pdfFile,
@@ -40,15 +41,15 @@ export const ProcessingSteps = ({
4041
4142 const handleLoadExample = useCallback ( async ( ) => {
4243 try {
43- const fetchResponse = await fetch ( EXAMPLE_PDF_URL ) ;
44+ const fetchResponse = await fetch ( EXAMPLE_PDF . URL ) ;
4445
4546 if ( ! fetchResponse . ok ) {
4647 console . error ( "Failed to fetch example PDF:" , fetchResponse . statusText ) ;
4748 return ;
4849 }
4950
5051 const pdfBlob = await fetchResponse . blob ( ) ;
51- const exampleFile = new File ( [ pdfBlob ] , EXAMPLE_PDF_FILENAME , {
52+ const exampleFile = new File ( [ pdfBlob ] , EXAMPLE_PDF . FILENAME , {
5253 type : "application/pdf" ,
5354 } ) ;
5455
You can’t perform that action at this time.
0 commit comments