Skip to content

Commit 437e6ac

Browse files
committed
add loading
Former-commit-id: cf69be0
1 parent 5432862 commit 437e6ac

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Diff for: ui/src/pages/Converter/File/index.tsx

+3-5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
Icon,
77
ResponsiveButton,
88
ResponsiveSelectWithLabel,
9+
Spin,
910
} from "components/General";
1011
import styles from "./FileConverter.module.scss";
1112
import { useFfmpeg } from "./useFfmpeg";
@@ -39,8 +40,6 @@ function FileConverter() {
3940
fileConverter.file.name
4041
)}${selectedFormat}`;
4142

42-
console.log("ileConverter.to", selectedFormat);
43-
4443
await ffmpeg.writeFile(
4544
fileConverter.file.name,
4645
await fetchFile(fileConverter.file.originFileObj)
@@ -83,9 +82,6 @@ function FileConverter() {
8382
},
8483
onChange(info) {
8584
const { status } = info.file;
86-
if (status !== "uploading") {
87-
// console.log(info.file, info.fileList);
88-
}
8985
if (status === "done") {
9086
message.success(
9187
`${info.file.name} file uploaded successfully.`
@@ -147,6 +143,7 @@ function FileConverter() {
147143

148144
return (
149145
<div className={styles.ic}>
146+
{!loaded && <Spin />}
150147
<Dragger {...props}>
151148
<p className="ant-upload-drag-icon">
152149
<Icon name="Inbox" size={100} strokeWidth="0.2" />
@@ -162,6 +159,7 @@ function FileConverter() {
162159
type="primary"
163160
onClick={convertFiles}
164161
disabled={!loaded}
162+
icon
165163
>
166164
{uploadFiles.length > 1 ? "Convert All" : "Convert"}
167165
</ResponsiveButton>

0 commit comments

Comments
 (0)