11import { useState , useMemo , useEffect , useCallback } from "react" ;
2- import { motion , AnimatePresence } from "framer-motion" ;
2+ import { AnimatePresence } from "framer-motion" ;
33import { Link } from "react-router-dom" ;
44import "../App.css" ;
55
@@ -53,10 +53,14 @@ function AppPage() {
5353
5454 // Settings state
5555 const [ includeComments , setIncludeComments ] = useState ( true ) ;
56- const [ syntaxColors , setSyntaxColors ] = useState ( { ...DEFAULT_SYNTAX_COLORS } ) ;
56+ const [ syntaxColors , setSyntaxColors ] = useState ( {
57+ ...DEFAULT_SYNTAX_COLORS ,
58+ } ) ;
5759 const [ orientation , setOrientation ] = useState ( "landscape" ) ;
5860 const [ quality , setQuality ] = useState ( "standard" ) ;
59- const [ animationTiming , setAnimationTiming ] = useState ( { ...DEFAULT_TIMING_STR } ) ;
61+ const [ animationTiming , setAnimationTiming ] = useState ( {
62+ ...DEFAULT_TIMING_STR ,
63+ } ) ;
6064
6165 // Line groups state
6266 const [ lineGroups , setLineGroups ] = useState ( [ ] ) ;
@@ -135,7 +139,9 @@ function AppPage() {
135139 return false ;
136140 }
137141 if ( lineNum < startLine || lineNum > endLine ) {
138- alert ( `Warning: Line ${ lineNum } is outside range [${ startLine } , ${ endLine } ]` ) ;
142+ alert (
143+ `Warning: Line ${ lineNum } is outside range [${ startLine } , ${ endLine } ]` ,
144+ ) ;
139145 return false ;
140146 }
141147 return true ;
@@ -308,13 +314,18 @@ function AppPage() {
308314 const taskId = result . taskId ;
309315 const progressInterval = setInterval ( async ( ) => {
310316 try {
311- const progressResponse = await fetch ( `${ API_URL } /api/progress/${ taskId } ` ) ;
317+ const progressResponse = await fetch (
318+ `${ API_URL } /api/progress/${ taskId } ` ,
319+ ) ;
312320 if ( progressResponse . ok ) {
313321 const progressData = await progressResponse . json ( ) ;
314322 setLoadingProgress ( progressData . progress ) ;
315323 setLoadingStatus ( progressData . status || "processing" ) ;
316324
317- if ( progressData . status === "complete" || progressData . progress >= 100 ) {
325+ if (
326+ progressData . status === "complete" ||
327+ progressData . progress >= 100
328+ ) {
318329 clearInterval ( progressInterval ) ;
319330 }
320331 }
@@ -326,10 +337,15 @@ function AppPage() {
326337 await new Promise ( ( resolve ) => {
327338 const checkComplete = setInterval ( async ( ) => {
328339 try {
329- const progressResponse = await fetch ( `${ API_URL } /api/progress/${ taskId } ` ) ;
340+ const progressResponse = await fetch (
341+ `${ API_URL } /api/progress/${ taskId } ` ,
342+ ) ;
330343 if ( progressResponse . ok ) {
331344 const progressData = await progressResponse . json ( ) ;
332- if ( progressData . status === "complete" || progressData . progress >= 100 ) {
345+ if (
346+ progressData . status === "complete" ||
347+ progressData . progress >= 100
348+ ) {
333349 clearInterval ( checkComplete ) ;
334350 clearInterval ( progressInterval ) ;
335351 setLoadingProgress ( 100 ) ;
@@ -390,7 +406,7 @@ function AppPage() {
390406 < Link to = "/" className = "back-to-home" >
391407 ← Back to Home
392408 </ Link >
393-
409+
394410 < motion . h1
395411 initial = { { opacity : 0 , y : - 20 } }
396412 animate = { { opacity : 1 , y : 0 } }
0 commit comments