Download section didn't appear. Resolved
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import { ThemeProvider, createTheme, CssBaseline } from '@mui/material'
|
||||
import { Box, Grid, Button, Alert, CircularProgress } from '@mui/material'
|
||||
import { Box, Grid, Button, CircularProgress } from '@mui/material'
|
||||
import { PlayArrow } from '@mui/icons-material'
|
||||
import { Layout } from './components/Layout'
|
||||
import { UploadZone } from './components/UploadZone'
|
||||
@@ -18,11 +18,17 @@ import { startSplit } from './api/client'
|
||||
|
||||
const App: React.FC = () => {
|
||||
const { theme } = useUIStore()
|
||||
const { taskId, file } = useUploadStore()
|
||||
const { taskId } = useUploadStore()
|
||||
const { entries, isValid } = useTracklistStore()
|
||||
const { options } = useOptionsStore()
|
||||
const { isProcessing, status, setStatus, setProgress, setMessage, setError, setIsProcessing, addLog, reset } =
|
||||
useTaskStore()
|
||||
const {
|
||||
isProcessing,
|
||||
setTaskId, // <-- Add this
|
||||
setError,
|
||||
setIsProcessing,
|
||||
addLog,
|
||||
reset,
|
||||
} = useTaskStore()
|
||||
|
||||
// Connect WebSocket when taskId is available and processing
|
||||
useWebSocket(taskId && isProcessing ? taskId : null)
|
||||
@@ -44,6 +50,8 @@ const App: React.FC = () => {
|
||||
}
|
||||
|
||||
try {
|
||||
// Set taskId in taskStore so DownloadSection can use it
|
||||
setTaskId(taskId)
|
||||
setIsProcessing(true)
|
||||
addLog('🚀 Starting split...')
|
||||
|
||||
@@ -106,8 +114,8 @@ const App: React.FC = () => {
|
||||
</Button>
|
||||
</Box>
|
||||
|
||||
{status && <ProgressDisplay />}
|
||||
{status === 'done' && <DownloadSection />}
|
||||
<ProgressDisplay />
|
||||
<DownloadSection />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Layout>
|
||||
@@ -115,4 +123,4 @@ const App: React.FC = () => {
|
||||
)
|
||||
}
|
||||
|
||||
export default App
|
||||
export default App
|
||||
|
||||
Reference in New Issue
Block a user