chore: something changed, commit before reorg
This commit is contained in:
@@ -20,7 +20,7 @@ const ERROR_UPLOAD_FAILED = "Не удалось загрузить файл"
|
||||
export const UploadStep: FunctionComponent<IUploadStepProps> = ({
|
||||
className,
|
||||
}): JSX.Element => {
|
||||
const { projectId, setFileKey, markStepCompleted, goNext } = useWizard()
|
||||
const { projectId, setFileKey } = useWizard()
|
||||
const [isDragging, setIsDragging] = useState(false)
|
||||
const [isUploading, setIsUploading] = useState(false)
|
||||
const [progress, setProgress] = useState(0)
|
||||
@@ -39,16 +39,18 @@ export const UploadStep: FunctionComponent<IUploadStepProps> = ({
|
||||
`projects/${projectId}`,
|
||||
setProgress,
|
||||
)
|
||||
setFileKey(result.file_path, result.file_id, result.filename ?? null)
|
||||
markStepCompleted("upload")
|
||||
goNext()
|
||||
await setFileKey(
|
||||
result.file_path,
|
||||
result.file_id,
|
||||
result.filename ?? null,
|
||||
)
|
||||
} catch {
|
||||
setError(ERROR_UPLOAD_FAILED)
|
||||
} finally {
|
||||
setIsUploading(false)
|
||||
}
|
||||
},
|
||||
[projectId, setFileKey, markStepCompleted, goNext],
|
||||
[projectId, setFileKey],
|
||||
)
|
||||
|
||||
const handleFileChange = useCallback(
|
||||
|
||||
Reference in New Issue
Block a user